[RGen] First inclusion of a roslyn generator for the bindings.#21389
[RGen] First inclusion of a roslyn generator for the bindings.#21389mandel-macaque merged 27 commits intomainfrom
Conversation
We are doing the following:
1. Adding the rgen directory with the following solutions:
* Analyzer: Analyzer that will catch errors in the bindings. At the
moment it provides a single error when the BindingTypeAttribute is
used in a nont partial type.
* Analyzer Tests: Allows tests for the analyzer.
* Analyzer Sample: Sample project to test the analyzer.
* Code Generator: A code generator that adds the BindingTypeAttribute
to the compilcation.
* Code Generator Tests: Allows tests for the generator.
* Code Sample: Sample project for the code generator.
2. Make rule to build the roslyn code generator.
3. Makefile changes to add the code generator as part as the second
compilation of the bindings.
This changes add the starting gounds to move to roslyn.
|
| protected CSharpGeneratorDriver _driver; | ||
| protected PortableExecutableReference [] _references; | ||
| // HACK: this is a hack to get the runtime dll for the attributes | ||
| const string RuntimeDll = "/Users/mandel/Xamarin/xamarin-macios/xamarin-macios/src/build/dotnet/ios/64/Microsoft.iOS.dll"; |
There was a problem hiding this comment.
Ugh, I need to fix this for the tests. @haritha-mohan can you do the same trick you do with adr here?
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
rolfbjarne
left a comment
There was a problem hiding this comment.
The tests should be executed when the generator/bgen tests are executed in xharness as well.
| @@ -0,0 +1,26 @@ | |||
| /* | |||
There was a problem hiding this comment.
Either remove or uncomment/fix.
| @@ -0,0 +1,32 @@ | |||
| /* | |||
There was a problem hiding this comment.
Either remove or uncomment/fix.
| /// A sample code fix provider that renames classes with the company name in their definition. | ||
| /// All code fixes must be linked to specific analyzers. |
rolfbjarne
left a comment
There was a problem hiding this comment.
The tests should be executed when the generator/bgen tests are executed in xharness as well.
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🔥 [CI Build] Build failed 🔥Build failed for the job 'Build packages' Pipeline on Agent |
1. Allow the tests to use the compiled dlls for dotnet. 2. Added an example test for the code generator. 3. Added an example test for the analyzer. 4. Included the new test projects in xharness.
…arin-macios into dev/mandel/rgen-init-project
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…arin-macios into dev/mandel/rgen-init-project
💻 [CI Build] Windows Integration Tests passed 💻✅ All Windows Integration Tests passed. Pipeline on Agent |
✅ API diff for current PR / commit.NET (No breaking changes)✅ API diff vs stable.NET (No breaking changes)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
💻 [CI Build] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
💻 [CI Build] Tests on macOS M1 - Mac Monterey (12) passed 💻✅ All tests on macOS M1 - Mac Monterey (12) passed. Pipeline on Agent |
💻 [CI Build] Tests on macOS M1 - Mac Ventura (13) passed 💻✅ All tests on macOS M1 - Mac Ventura (13) passed. Pipeline on Agent |
🔥 [CI Build] Test results 🔥Test results❌ Tests failed on VSTS: test results 0 tests crashed, 1 tests failed, 100 tests passed. Failures❌ dotnettests tests (macOS)Details
Html Report (VSDrops) Download Successes✅ cecil: All 1 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
We are doing the following: 1. Adding the rgen directory with the following solutions: * Analyzer: Analyzer that will catch errors in the bindings. At the moment it provides a single error when the BindingTypeAttribute is used in a nont partial type. * Analyzer Tests: Allows tests for the analyzer. * Analyzer Sample: Sample project to test the analyzer. * Code Generator: A code generator that adds the BindingTypeAttribute to the compilcation. * Code Generator Tests: Allows tests for the generator. * Code Sample: Sample project for the code generator. 2. Make rule to build the roslyn code generator. 3. Makefile changes to add the code generator as part as the second compilation of the bindings. This changes add the starting gounds to move to roslyn. --------- Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com> Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com> Co-authored-by: Alex Soto <alex@soto.dev>
We are doing the following:
This changes add the starting gounds to move to roslyn.