Skip to content
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: Remove run_in_subprocess & subprocess_main dependencies #89393

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

Repiteo
Copy link
Contributor

@Repiteo Repiteo commented Mar 11, 2024

After getting the idea1 to check if build-flakiness on Windows is still an issue, it seems that the root cause had everything to do with ensuring that a partially-generated file gets deleted on build failure. For whatever reason, this wasn't consistently happening on Windows, so a pretty massive workaround had to be implemented. This PR implements a new contingency plan in the form of purge_flaky_files: a new atexit function that will ensure any "targeted" files tied to build failures are properly removed. Consequently, the need for the old system's complex workarounds are no longer necessary & the relevant functions have been removed. The only other refactoring necessary was ensuring that the target and source arguments are properly parsed as strings/paths in functions that previously relied on being a subprocess (run_in_subprocess converted those arguments previously, even for non-Windows platforms).

Sidenote: While it's now entirely possible to bring back the generator functions to their respective SCsub files, that's a bit outside this PR's scope. I'd rather that conversion process be part of a general cleanup of the generator functions, as most don't utilize "modern" Python conventions. More importantly, it would risk hiding away the "real" changes of this PR.

Footnotes

  1. https://github.com/godotengine/godot/pull/89365#issuecomment-1987345654

@akien-mga akien-mga modified the milestones: 4.x, 4.3 Mar 11, 2024
@akien-mga akien-mga merged commit b1b0a52 into godotengine:master Mar 11, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@Repiteo Repiteo deleted the retire-subprocess_main branch March 11, 2024 23:02
@SeleDreams
Copy link

Since this got removed, what is the best replacement ? because my 3ds port depended on it to build the final 3dsx

prog = env.add_program("#bin/godot", files)
env.AddPostAction(prog, run_in_subprocess(
    platform_3ds_builders.make_debug_3ds))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants