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: Refactor selected_platform conditional #90214

Merged

Conversation

Repiteo
Copy link
Contributor

@Repiteo Repiteo commented Apr 4, 2024

Realized that well over half of SConstruct has logic behind a selected_platform conditional that could've been resolved ahead of time. By consolidating the "else" logic to directly after selected_platform is finalized, this removes the conditional & cleans up other checks as a consequence of said conditional. I recommend hiding whitespace changes when checking diffs, as there's a lot of indentation noise otherwise.

@Repiteo Repiteo requested a review from a team as a code owner April 4, 2024 17:48
@akien-mga akien-mga added this to the 4.3 milestone Apr 4, 2024
@akien-mga akien-mga merged commit 7a941d8 into godotengine:master Apr 5, 2024
17 checks passed
@akien-mga
Copy link
Member

Thanks!

akien-mga added a commit that referenced this pull request Apr 5, 2024
It gives:

> SyntaxError: f-string expression part cannot include a backslash

Follow-up to #90214.
elif selected_platform != "list":
print(f'Invalid target platform "{selected_platform}".')

print(f"The following platforms are available:\n\t{'\n\t'.join(platform_list)}\n")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the record, this doesn't seem to be legal in Python 3.10. So I fixed it up in 7e4c150 (and IMO that's more readable anyway ;)).

DanielSnd pushed a commit to DanielSnd/godot that referenced this pull request Apr 10, 2024
It gives:

> SyntaxError: f-string expression part cannot include a backslash

Follow-up to godotengine#90214.
@Repiteo Repiteo deleted the scons/selected_platform-refactor branch April 17, 2024 17:27
divshekhar pushed a commit to divshekhar/godot that referenced this pull request Apr 23, 2024
It gives:

> SyntaxError: f-string expression part cannot include a backslash

Follow-up to godotengine#90214.
MewPurPur pushed a commit to MewPurPur/godot that referenced this pull request Jul 11, 2024
It gives:

> SyntaxError: f-string expression part cannot include a backslash

Follow-up to godotengine#90214.
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.

2 participants