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
use cleaner syntax for C# Generated.cs files #31923
Conversation
I think we have a guideline to have all usings outside the namespace. If there is a conflict between the usings, then it may be necessary to split the file. Let's hold off on that until things are reviewed in current state though. #Closed Refers to: src/Compilers/CSharp/Test/Syntax/Generated/Syntax.Test.xml.Generated.cs:8 in 0dfbd1e. [](commit_id = 0dfbd1e, deletion_comment = False) |
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.
LGTM with open question about usings inside namespaces. Thanks
@jcouv any update on this? #Closed |
So I should generate two files? One for the internal syntax and one for the public #Closed |
You can either revert to use fully-qualified names, or split the file. Thanks #Closed |
Why can't you just place the usings outside the namespace? #Closed |
I expect this results in ambiguities between public and internal syntax nodes. But if there is a way to make that work, that'd be fine too. #Closed |
@jcouv Done! #Closed |
Looks like indentation is different from place to place? (2 spaces vs 4) #Closed |
hmm, looks like there are many name conflicts between the internal namespace and the public one. |
OK, now it's ready for review #Closed |
src/Tools/Source/CompilerGeneratorTools/Source/BoundTreeGenerator/BoundNodeClassWriter.cs
Show resolved
Hide resolved
src/Tools/Source/CompilerGeneratorTools/Source/CSharpSyntaxGenerator/TestWriter.cs
Show resolved
Hide resolved
nit: consider breaking fat arrows to the next line with an indent (as you did in the generated Test file), at least for long expressions. Refers to: src/Compilers/CSharp/Portable/Generated/Syntax.xml.Internal.Generated.cs:1572 in c994637. [](commit_id = c994637, deletion_comment = False) |
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.
LGTM Thanks (iteration 15)
Note: I've recently changed the code generator in |
Thanks. @dotnet/roslyn-compiler for a second review of this community PR. |
1 similar comment
Thanks. @dotnet/roslyn-compiler for a second review of this community PR. |
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.
LGTM (commit 16)
@333fred Just merged from master to resolve the conflicts and then ran the generators again to fix the generated code |
Thanks @Meir017! |
summary of changes: