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: Do not print a warning when passing profile to command-line #55698

Closed

Conversation

Xrayez
Copy link
Contributor

@Xrayez Xrayez commented Dec 7, 2021

The profile option is used to specify default SCons options via file. However, after #55203, this prints a warning when the option is used, because it's unrecognized by SCons.

Warning: Adding profile as an actual SCons option is not a solution, because it's used as a base for Variables(). therefore ignoring this option when printing a warning is enough.

For those not familiar with profile, see also #38821.

Bugsquad edit: This closes #56359.

The `profile` option is used to specify default SCons options via file. However, this prints a warning when the option is used, because it's unrecognized by SCons.

Adding `profile` as an actual SCons option is not a solution, because it's used as a base for `Variables()`. therefore ignoring this option when printing an warning is enough.
@Xrayez Xrayez requested a review from a team as a code owner December 7, 2021 17:25
@Calinou Calinou added bug topic:buildsystem cherrypick:3.4 cherrypick:3.x Considered for cherry-picking into a future 3.x release labels Dec 7, 2021
@Calinou Calinou added this to the 4.0 milestone Dec 7, 2021
@Calinou
Copy link
Member

Calinou commented Dec 7, 2021

This could also be extended to Mono-specific SCons options, which are currently considered to be unknown.

@Xrayez
Copy link
Contributor Author

Xrayez commented Dec 8, 2021

This could also be extended to Mono-specific SCons options, which are currently considered to be unknown.

I looked into this, looks like the problem is that Variables() may be populated per-module, so this will affect all modules not just Mono. The potential solution could be to require to define get_opts() for each module similarly how it's done per platform, create a single instance of Variables() when all options are collected.

This is certainly outside the scope of this PR and requires some major refactor, due to this I think that #55203 should be reverted in 3.x branch, this affects my projects like: https://github.com/goostengine/goost, https://github.com/Xrayez/godot-anl etc.

Hardcoding values into the list as in this PR would also be quite hacky and error-prone, I don't recommend it. Again, this is not only about built-in modules, #55203 affects custom modules as well.

@akien-mga
Copy link
Member

See #53030 which aimed to address that for Mono options while implementing the same feature.

I agree that hardcoding "not yet known" parameters is not a good option as it doesn't scale well for custom modules. I'll revert the change for 3.4 and 3.x until we figure out the best approach.

@Xrayez
Copy link
Contributor Author

Xrayez commented Dec 8, 2021

Thanks, note that I think this PR is still needed since profile option is a special case, so this could be merged regardless of further rewrite/refactor to collect modules options.

But it's up to you.

@Xrayez
Copy link
Contributor Author

Xrayez commented Jan 1, 2022

I noticed #56359 popped up, so yeah I recommend merging this PR.

@akien-mga
Copy link
Member

I prefer to revert the change for now as there are still regressions to solve beside the special case of profile.
#56551

@Xrayez
Copy link
Contributor Author

Xrayez commented Jan 6, 2022

This is an excellent decision.

@Xrayez Xrayez deleted the profile-keep-unrecognized branch January 6, 2022 11:20
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.

adding a "profile=" option to the scons command line yeld a warning message, while the custom.py gets parsed
3 participants