Open Youssef1313 opened 1 year ago
cc @CyrusNajmabadi @kinkeadian25
The SyntaxGenerator
type is there from 2015, but suddenly ~10 pretty common (IMO) bugs are reported in just past several hours. I wonder, how all they were sitting undescovered in the codebase for all these years...
SynGen is basically used by a subset of features, and contains with functionally to work well for them. There's a new customer using is to roundtrip all symbols, so it's finding holes that haven't been relevant for it features that sit on it.
Also, most of our features that require a high degree of customizability end up using a different code gen layer that is not exposed. It would be nice to unify all of this. But it hasn't ever been a priority, and it risks many regressions.
https://github.com/dotnet/roslyn/blob/89976fde42e8a7cad791798653279a47e2c5599d/src/Workspaces/Core/Portable/Editing/SyntaxGenerator.cs#L600-L622
Modifiers are missing in interfaces, unlike classes and structs (e.g,
file
).