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
[bgen] Fix assembly comparison. Fixes #19612. #19619
Conversation
This fixes a regression in .NET 8, where we changed the temporary assembly name when building using a project file / MSBuild - we started compiling the temporary binding code in MSBuild instead of in the generator, and in the process we changed the name of the temporary assembly. This broke logic in bgen that compared the assembly name to check if a given type is from the temporary assembly or not. Fix this by checking the actual temporary assembly instead of the name of the assembly instead. Fixes xamarin#19612.
|
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.
src/bgen/BindingTouch.cs
Outdated
public bool IsApiAssembly (Assembly assembly) | ||
{ | ||
return assembly == apiAssembly; | ||
} | ||
|
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.
Can we move this to the Generator class? That way we do not need to call it as BindingTouch.IsApiAssembly, just call the method. Ideally would be nice to be able to have the generator be self-contained and that way be able to unit test things like this.
Would be nice to have the integration tests we have atm + unit tests for this kind of logic.
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.
@mandel-macaque fixed
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] Windows Integration Tests passed 💻✅ All Windows Integration Tests passed. Pipeline on Agent |
📚 [PR Build] Artifacts 📚Packages generatedView packagesPipeline on Agent |
💻 [CI Build] Tests on macOS M1 - Mac Big Sur (11.5) passed 💻✅ All tests on macOS M1 - Mac Big Sur (11.5) passed. Pipeline on Agent |
💻 [CI Build] Tests on macOS M1 - Mac Ventura (13.0) passed 💻✅ All tests on macOS M1 - Mac Ventura (13.0) passed. Pipeline on Agent |
✅ API diff for current PR / commitLegacy Xamarin (No breaking changes)
NET (empty diffs)
✅ API diff vs stableLegacy Xamarin (No breaking changes).NET (No breaking changes)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build] Test results 🚀Test results✅ All tests passed on VSTS: simulator tests. 🎉 All 235 tests passed 🎉 Tests counts✅ bcl: All 69 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
/sudo backport release/8.0.1xx |
Backport Job to branch release/8.0.1xx Created! The magic is happening here |
Oh no! Backport failed! Please see https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=8812162 for more details. |
This fixes a regression in .NET 8, where we changed the temporary assembly name when building using a project file / MSBuild - we started compiling the temporary binding code in MSBuild instead of in the generator, and in the process we changed the name of the temporary assembly. This broke logic in bgen that compared the assembly name to check if a given type is from the temporary assembly or not. Fix this by checking the actual temporary assembly instead of the name of the assembly instead. Fixes xamarin#19612. Backport of xamarin#19619.
This fixes a regression in .NET 8, where we changed the temporary assembly name when building using a project file / MSBuild - we started compiling the temporary binding code in MSBuild instead of in the generator, and in the process we changed the name of the temporary assembly. This broke logic in bgen that compared the assembly name to check if a given type is from the temporary assembly or not. Fix this by checking the actual temporary assembly instead of the name of the assembly instead. Fixes #19612. Backport of #19619.
This fixes a regression in .NET 8, where we changed the temporary assembly name when
building using a project file / MSBuild - we started compiling the temporary binding
code in MSBuild instead of in the generator, and in the process we changed the name
of the temporary assembly. This broke logic in bgen that compared the assembly name
to check if a given type is from the temporary assembly or not.
Fix this by checking the actual temporary assembly instead of the name of the assembly
instead.
Fixes #19612.