-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
How are all the polyfill source files generated? #88
Comments
The System.Diagnostics.UnreachableException.cs file was not actually auto-generated (see Sergio0694#88).
The System.Diagnostics.UnreachableException.cs file was not actually auto-generated (see Sergio0694#88). Fixes Sergio0694#60
Hey there! The polyfills are generated by an incremental generator bundled in the package 🙂 PolySharp/src/PolySharp.SourceGenerators/PolyfillsGenerator.cs Lines 10 to 11 in 2689b7e
|
OK, I think my question was not clear enough. Let's try to rephrase it: where do files inside the Were the 3 first lines manually added despite the first line implying the opposite?
I hope my question makes sense now. |
Oooh gotcha, sorry. Yeah those were just manually added to those files 😄 |
OK, got it. I was totally fooled by the |
The System.Diagnostics.UnreachableException.cs file was not actually auto-generated (see Sergio0694#88). Fixes Sergio0694#60
The System.Diagnostics.UnreachableException.cs file was not actually auto-generated (see Sergio0694#88). Fixes Sergio0694#60
Looking inside
src/PolySharp.SourceGenerators/EmbeddedResources
all polyfill source files are marked as// <auto-generated/>
but I could not figure out how exactly those files are generated. I was expecting to find a tool inside this repository that was responsible for automatically generating those files, but could not find one! I even tried looking at the commit history to find clues but it did not help.@Sergio0694 Could you please shed some light?
Some context: I wanted to contribute a polyfill for
UnreachableException
(issue #60) and I had to copy/paste the code from https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/Diagnostics/UnreachableException.cs It felt very much cheating to not use automatic code generation like all other polyfills.The text was updated successfully, but these errors were encountered: