-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[dotnet] Removed {{separator}} token from C# filename codegen #13237
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
[dotnet] Removed {{separator}} token from C# filename codegen #13237
Conversation
…f Accesibility{{separator}}AXPropertyName.cs for instance.
Somebody introduced I propose very simple fix: path = path.Replace("{{separator}}", System.IO.Path.DirectorySeparatorChar.ToString()); If it works, then we also can remove the following line: path = path.Replace('\\', System.IO.Path.DirectorySeparatorChar); Seems somebody also tried to fix the same thing around path separator token. |
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.
We still need to support {{separator}}
token. Let's replace it in runtime.
Seems it works, please doble-check carefully: - path = path.Replace('\\', System.IO.Path.DirectorySeparatorChar);
+ path = path.Replace("{{separator}}", System.IO.Path.DirectorySeparatorChar.ToString());
+ //path = path.Replace('\\', System.IO.Path.DirectorySeparatorChar); |
That also works, confirmed with our build environment. Committed the changes. We both need the |
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## trunk #13237 +/- ##
==========================================
+ Coverage 57.52% 57.95% +0.43%
==========================================
Files 86 88 +2
Lines 5299 5333 +34
Branches 221 224 +3
==========================================
+ Hits 3048 3091 +43
+ Misses 2030 2018 -12
- Partials 221 224 +3 ☔ View full report in Codecov by Sentry. |
Thanks @EdwinVanVliet for your contribution! |
Description
On our own build environment we noticed that the intermediate files being generated when running the codegen contain the {{separator}} token. When looking into the Utility.cs ReplaceTokensInPath function there is no replacement being done on the {{separator}} token. This PR removes the {{separator}} token from the template within CodeGenerationDefinitionTemplateSettings.cs causing filenames to be outputted without {{separator}}.
Also this issue caused some files to end up in the wrong directory. The AXPropertyName.cs should be located in the Accesibility domain, but it ended up in WebAuthn.
Before fix.

After fix.

Types of changes
Checklist