-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Convert language-specific option types to records #66633
Merged
Merged
Conversation
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
tmat
commented
Feb 1, 2023
...sualBasic/Portable/CodeCleanup/Providers/NormalizeModifiersOrOperatorsCodeCleanupProvider.vb
Show resolved
Hide resolved
tmat
force-pushed
the
SharedOptions
branch
5 times, most recently
from
February 2, 2023 16:44
e76a07c
to
d23488e
Compare
dibarbet
approved these changes
Feb 3, 2023
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.
seems reasonable
ghost
added this to the Next milestone
Feb 5, 2023
333fred
added a commit
to 333fred/roslyn
that referenced
this pull request
Feb 6, 2023
* upstream/main: (547 commits) Add VerifyMethodBody helper as a replacement of VerifyIL (dotnet#66536) don't offer rename for ctor snippet (dotnet#66704) Get `ConditionalAttribute` type only once per compilation Convert language-specific option types to records (dotnet#66633) Enable MSBuild COMM log (dotnet#66708) ⚡️Share AssemblyloadTestFixture on Framework (dotnet#66684) NRT Don't overwrite binary logs in CI (dotnet#66683) Fix 'Generate Enum Member' to work in a 'Color Color' case. Find bitwise operators accessed through logical operators in FAR Semantic snippets - `propg` and `propi` snippets (dotnet#65979) NRT Properly classify aliases in quick info Fix Add tests Add support for finding collection initialiers with FAR Do not suggest replacing lambda with method group if the invoked mehod has `Conditional` attribute Revert "Record added node output states as new (dotnet#61575)" (dotnet#66696) Record added node output states as new (dotnet#61575) Fix formatting issue with convert-to-full-prop ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We have a few option types that have a common base class and then C# and VB specific derived classes containing the language-specific settings. Ideally, all these types would be records. However, it is not currently possible to derive from C# record in VB.
We also eventually want some of these types to be public and thus have a good public surface and usability (e.g. being able to use
with
operator to get an updated options object).To work around the VB limitation this change defines the VB type in common layer, in the same namespace it would have been defined in the VB layer if VB allowed the definition to exist there.
This wart seems like a reasonable trade-off, considering the alternative would be to hand-write (or source-generate) a lot of
WithXyz
methods, GetHashCode, Equals, etc.Each commit can be reviewed separately.