-
Notifications
You must be signed in to change notification settings - Fork 519
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NET Attribute Conversion][generator] Generate NET style attributes (#…
…14779) This PR teaches our code generator to generate .NET 6 style availability attributes, adds a 4th Cecil test to verify our generated attributes, and a metric ton of API changes to satisfy that test. The generator work is the core of this PR, and includes: - Hacking out chunks of generator.cs that "helpfully" remove duplicate attributes, which are no longer duplicate in the new order that NET6 attributes force upon us. See changes in FilterMinimumVersion and PrintPlatformAttributes - Prevent a crash when the generator processes availability attributes with no version included (example: introduced on iOS but no version). See Is64BitiOSOnly. - The meat, GetPlatformAttributesToPrint, which synthesizes many attributes "out of thing air" from: - The parent context - Implied introduced just because the class exists on a given framework at all - Implied Catalyst because iOS exists - A few cludgy hacks PrintPlatformAttributesNoDuplicates and GenerateProperty because the existing PrintPlatformAttributes did not pass down parent context down, and the refactor was dangerous/too time consuming given time pressure. There are two intended API changes introduced by the reviews in this PR: - GetCurrentInputDevice was obviously intended by availability attributes to exist on Catalyst but due to define confusion was excluded. It is an addition in Microsoft.MacCatalyst.dll only. - The NEAppRule constructors were mis-marked on platforms, and were showing up incorrectly on Mac/Catalyst. I corrected the Catalyst one unconditionally, as we have not shipped Catalyst yet, but Mac is only fixed in NET6. There is a lot of follow up work in #14802 to do to remove a number of hard coded test failures, but this should be almost all of the remaining work in NET6 attributes. 🤞 this doesn't break too much for future us. Co-authored-by: Rolf Bjarne Kvinge <[email protected]> Co-authored-by: Manuel de la Pena <[email protected]>
- Loading branch information
1 parent
7a69d08
commit 1dcefc9
Showing
102 changed files
with
1,499 additions
and
755 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
1dcefc9
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.
📋 [CI Build] API Diff 📋
API Current PR diff
ℹ️ API Diff (from PR only) (please review changes)
View API diff
View dotnet API diff
View dotnet legacy API diff
View dotnet iOS-MacCatalayst API diff
API diff
✅ API Diff from stable
View API diff
View dotnet API diff
View dotnet legacy API diff
View dotnet iOS-MacCatalayst API diff
Generator diff
ℹ️ Generator Diff (please review changes)
Pipeline on Agent XAMMINI-053.Monterey'
Hash: 1dcefc9c560d95f6b64a1a93e497bf69d4d95fed
1dcefc9
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.
💻 [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
Hash: 1dcefc9c560d95f6b64a1a93e497bf69d4d95fed
1dcefc9
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.
❌ [CI Build] Tests on macOS Mac Catalina (10.15) failed ❌
Failed tests are:
Pipeline on Agent
Hash: 1dcefc9c560d95f6b64a1a93e497bf69d4d95fed
1dcefc9
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.
📚 [CI Build] Artifacts 📚
Packages generated
View packages
Pipeline on Agent XAMMINI-061.Monterey
Hash: 1dcefc9c560d95f6b64a1a93e497bf69d4d95fed
1dcefc9
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.
❌ [CI Build] Tests failed on VSTS: simulator tests iOS ❌
Tests failed on VSTS: simulator tests iOS.
Test results
3 tests failed, 231 tests passed.
Failed tests
Pipeline on Agent XAMBOT-1043.Monterey'
[NET Attribute Conversion][generator] Generate NET style attributes (#14779)