-
-
Notifications
You must be signed in to change notification settings - Fork 21.9k
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
SCons: Generate all scripts natively, implement wrapper function #91624
Conversation
3bd86ae
to
87c0b13
Compare
I have no clue why the Windows test fails; it's passing without issue for me locally |
53453e1
to
75c4bd6
Compare
@Repiteo I never touched the test suite before, but I'd take a look at From what I can tell, it looks like the To remove any doubt I'd copy the current file, blast it out, let it regenerate and make a diff. That's probably why it works for you. |
Finally got it to fail on my end, and it was through replicating the exact build flags used by GHA. Now I have a starting point to start looking back at where the disparity could've happened, though it'll still take quite a bit of digging. |
75c4bd6
to
34fb3f7
Compare
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.
Looks great to me!
Thanks! |
SCons: Fix generation of `disabled_classes.gen.h` after #91624
Retires
methods.write_file_if_needed
, as every single script is now generated through SCons methods directly! This means that these scripts will now show up on the Progressor & are automatically cleaned/rebuilt as needed. Any converted function that's tailored to a specific directory is now in the appropriateSCSub
, to properly link up with their expected libraries.In the process of converting these functions to SCons natively, I implemented
methods.generated_wrapper
to make the generated files much prettier. This wrapper is acontextlib.contextmanager
, meaning it utilizes thewith
keyword to handle most boilerplate logic (automatically writes to provided path & adds documentation header + header guards) while only needing to be passed the SConstarget
. I'm very likely to continue porting over generated functions to this new wrapper (especially considering the high probability of other non-SCons generated scripts that didn't usemethods.write_file_if_needed
); however, I wanted to specifically focus on themethods.write_file_if_needed
functions as that made for a healthy initial sample size.Examples:
version_generated.gen.h | Before
version_generated.gen.h | After
windows/export/logo_svg.gen.h | Before
windows/export/logo_svg.gen.h | After