-
Notifications
You must be signed in to change notification settings - Fork 517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RGen] Do not pass the root binding context around. #21945
Conversation
There is no need to pass the root biding around to be able to gernerate the Library.g.cs. What we can do is change the code to have to diff incremental code provides. 1. A provider that will detect code changes. 2. A provider that will detect changes that required a Library.g.cs change. To achieve the above what we do is to add the library information when we detect code changes. This new fields that provide the library information are then collected to trigger a new generation event.
|
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.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
/azp run xamarin-macios-pr |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 5 out of 14 changed files in this pull request and generated no comments.
Files not reviewed (9)
- src/rgen/Microsoft.Macios.Generator/Emitters/EnumEmitter.cs: Evaluated as low risk
- src/rgen/Microsoft.Macios.Generator/Context/BindingContext.cs: Evaluated as low risk
- tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/EnumMemberCodeChangesTests.cs: Evaluated as low risk
- tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/EnumMembersEqualityComparerTests.cs: Evaluated as low risk
- tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/CodeChangesEqualityComparerTests.cs: Evaluated as low risk
- tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/CodeChangesComparerTests.cs: Evaluated as low risk
- tests/rgen/Microsoft.Macios.Generator.Tests/SmartEnum/SmartEnumDiagnosticsTests.cs: Evaluated as low risk
- tests/rgen/Microsoft.Macios.Generator.Tests/Context/RootBindingContextTests.cs: Evaluated as low risk
- src/rgen/Microsoft.Macios.Generator/DataModel/EnumMember.cs: Evaluated as low risk
Comments suppressed due to low confidence (3)
src/rgen/Microsoft.Macios.Generator/BindingSourceGeneratorGenerator.cs:74
- [nitpick] The variable name 'RootBindingContext' is ambiguous and inconsistent with its usage. It should be renamed to 'bindingContext' for clarity.
static (RootBindingContext RootBindingContext, CodeChanges Changes, bool BindingAttributeFound) GetChangesForSourceGen (GeneratorSyntaxContext context)
src/rgen/Microsoft.Macios.Generator/BindingSourceGeneratorGenerator.cs:148
- The 'RootBindingContext' is being accessed from 'libraryChanges' but is not used consistently. Ensure that the context is used correctly and consistently throughout the code.
var rootBindingContext = libraryChanges [0].RootBindingContext;
src/rgen/Microsoft.Macios.Generator/DataModel/CodeChanges.cs:311
- Ensure that the Skip method is comprehensive enough to handle all potential cases that might need to be skipped.
if (Skip (enumValueDeclaration, context.SemanticModel))
We cannot use Export because we need to be ablet to pass the library name to generate the property field correctly. This change moves from using Export<Field> to Field<Property> which allows to mark a property as a field AND will allow use to add the library name. This change + the one in PR #21945 improves the way the Library.g.cs file is generated.
…amarin/xamarin-macios into dev/mandel/keep-track-libs-code-change
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.
✅ [PR Build] Build passed (Detect API changes) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
✅ [PR Build] Build passed (Build packages) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
✅ API diff for current PR / commit.NET ( No breaking changes )❗ API diff vs stable (Breaking changes).NET ( ❗ Breaking changes ❗ )ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
✅ [PR Build] Build passed (Build macOS tests) ✅Pipeline on Agent |
💻 [CI Build] Windows Integration Tests passed 💻✅ All Windows Integration Tests passed. Pipeline on Agent |
💻 [PR Build] Tests on macOS M1 - Mac Monterey (12) passed 💻✅ All tests on macOS M1 - Mac Monterey (12) passed. Pipeline on Agent |
💻 [PR Build] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
💻 [PR Build] Tests on macOS arm64 - Mac Sequoia (15) passed 💻✅ All tests on macOS arm64 - Mac Sequoia (15) passed. Pipeline on Agent |
💻 [PR Build] Tests on macOS M1 - Mac Ventura (13) passed 💻✅ All tests on macOS M1 - Mac Ventura (13) passed. Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🔥 [CI Build] Test results 🔥Test results❌ Tests failed on VSTS: test results 1 tests crashed, 0 tests failed, 108 tests passed. Failures❌ cecil tests🔥 Failed catastrophically on VSTS: test results - cecil (no summary found). Html Report (VSDrops) Download Successes✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
Cecil failures are due to bot issues. Unrelated with the PR. |
We cannot use Export because we need to be ablet to pass the library name to generate the property field correctly. This change moves from using Export<Field> to Field<Property> which allows to mark a property as a field AND will allow use to add the library name. This change + the one in PR #21945 improves the way the Library.g.cs file is generated.
We cannot use Export because we need to be ablet to pass the library name to generate the property field correctly. This change moves from using Export<Field> to Field<Property> which allows to mark a property as a field AND will allow use to add the library name. This change + the one in PR #21945 improves the way the Library.g.cs file is generated. --------- Co-authored-by: GitHub Actions Autoformatter <[email protected]>
We cannot use Export because we need to be ablet to pass the library name to generate the property field correctly. This change moves from using Export<Field> to Field<Property> which allows to mark a property as a field AND will allow use to add the library name. This change + the one in PR #21945 improves the way the Library.g.cs file is generated.
There is no need to pass the root binding around to be able to generate the Library.g.cs. What we can do is change the code to have to diff incremental code provides.
To achieve the above what we do is to add the library information when we detect code changes. This new fields that provide the library information are then collected to trigger a new generation event.