You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Generate DotNet (C#) names & package info in documentations #149
As a follow up to #130, add code necessary to generate native type names for C# as well as the necessary package coordinates (NuGet link, instructions to add dependency or install package).
It may be interesting to factor some of the logic that currently lives in the jsii-dotnet-generator with respects to name disambiguation in the compiler, so it can be reflected in the spec (maybe the spec could for example carry some "name hints"? This would make it easier to share the same behavior in the generator and in the documentation generator...
@mpiroc do you have anything against the idea? Or stuff we should be particularly careful about? I know it's a bit sensitive in the DotNet world, so I don't want to make a bad step here.
That would make life a lot easier for the .NET generator. Some things to keep in mind:
In order to disambiguate names, the compiler needs to know the native names of every namespace, type, property, and method. This effectively means that all .NET name conversion logic would need to move to the compiler.
The compiler would need to search for conflicts recursively--i.e. it needs to convert every name in each dependency as well.
You would need to implement SyntaxFacts.GetKeywordKind(text) yourself. You can find a list of keywords here. This matters mainly for parameter names, as most other names are PascalCased and won't conflict with an all-lowercase keyword.
If I think of anything else, I'll add it to this issue.
The generated names need to be stable (you don't want one of your C# names to change because some of your dependencies' implementation details have changed).
Activity
Output cross-language names in generated docs (#130)
RomainMuller commentedon Aug 6, 2018
It may be interesting to factor some of the logic that currently lives in the
jsii-dotnet-generatorwith respects to name disambiguation in the compiler, so it can be reflected in the spec (maybe the spec could for example carry some "name hints"? This would make it easier to share the same behavior in the generator and in the documentation generator...@mpiroc do you have anything against the idea? Or stuff we should be particularly careful about? I know it's a bit sensitive in the DotNet world, so I don't want to make a bad step here.
mpiroc commentedon Aug 6, 2018
That would make life a lot easier for the .NET generator. Some things to keep in mind:
SyntaxFacts.GetKeywordKind(text)yourself. You can find a list of keywords here. This matters mainly for parameter names, as most other names are PascalCased and won't conflict with an all-lowercase keyword.If I think of anything else, I'll add it to this issue.
RomainMuller commentedon Aug 7, 2018
An extra thing before I forget:
assyadh commentedon Aug 19, 2019
@RomainMuller is this still a thing?
chore(deps): update cattrs requirement from <1.10,>=1.8 to >=1.8,<1.1…
chore(deps): Update cattrs requirement from <1.11,>=1.8 to >=1.8,<22.…