-
-
Notifications
You must be signed in to change notification settings - Fork 328
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
Clean up CC and CXX FLAGS tests #4693
Conversation
using an underscore is basically saying "I know this returns something, and I actually mean to ignore it". |
Yup. I understand that, but I'd rather not sugguest to the community that using the return value for DefaultEnvironment() is a good idea. |
Then the public interface probably ought not to return anything... yeah, I can get rid of this usage if you're insistent, but it seems worthwhile to quiet IDEs. I guess the use case for it returning an env is so that you can examine it - what compilers did it find, etc.. Should we say in docs that you should not call methods on the returned env? There are some funky internal uses like: json_node = SCons.Defaults.DefaultEnvironment().arg2nodes(json)
path = SCons.Defaults.DefaultEnvironment()._CacheDir_path |
There's lots of use in the wild, so changing the return value would break a lot. |
that's on master, thus omitting the changes from the PR, so there are a bunch of them (three of those are false hits, they're actually |
7134652
to
79b85f2
Compare
Rolled back the assignment, now it's just a bare call. |
79b85f2
to
dc704ec
Compare
More consistency, formatting, add test/CXX/SHCCFLAGS.py for symmetry (test/CC/ had one), rename tests to -live since they use a real compiler, and also add that note to docstring. Remove some filename suffix fiddling that wasn't needed because in this usage, SCons figures it out - and we wnat that as part of the test. Signed-off-by: Mats Wichmann <mats@linux.com>
No longer assign the result of calling DefaultEnvironment to a dummy. Signed-off-by: Mats Wichmann <mats@linux.com>
dc704ec
to
9e9e8cc
Compare
More consistency, formatting, add
test/CXX/SHCCFLAGS.py
for symmetry (test/CC/
had one), rename tests to-live
since they use a real compiler, and also add that note to docstring. Remove some filename suffix fiddling that wasn't needed because in this usage, SCons figures it out - and we want that as part of the test.Testsuite-only change.
Contributor Checklist:
CHANGES.txt
andRELEASE.txt
(and read theREADME.rst
).