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

Fixing a bug with --debug=sconscript #4447

Merged
merged 6 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ NOTE: The 4.0.0 Release of SCons dropped Python 2.7 Support
NOTE: 4.3.0 now requires Python 3.6.0 and above. Python 3.5.x is no longer supported

RELEASE VERSION/DATE TO BE FILLED IN LATER

From Michał Górny:
- Remove unecessary dependencies on pypi packages from setup.cfg

From Sten Grüner:
- Fix of the --debug=sconscript option to return exist statements when using return
statement with stop flag enabled

RELEASE 4.6.0 - Sun, 19 Nov 2023 17:22:20 -0700

Expand Down
3 changes: 2 additions & 1 deletion RELEASE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ CHANGED/ENHANCED EXISTING FUNCTIONALITY
FIXES
-----

- List fixes of outright bugs
- Fix of the --debug=sconscript option to return exist statements when using return
statement with stop flag enabled

IMPROVEMENTS
------------
Expand Down
5 changes: 4 additions & 1 deletion SCons/Script/SConscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,10 @@ def _SConscript(fs, *files, **kw):
if SCons.Debug.sconscript_trace:
print("scons: Exiting "+str(scriptname))
except SConscriptReturn:
pass
if SCons.Debug.sconscript_trace:
print("scons: Exiting "+str(scriptname))
else:
pass
finally:
if Main.print_time:
elapsed = time.perf_counter() - start_time
Expand Down
12 changes: 12 additions & 0 deletions test/option/debug-sconscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@
'scons: Exiting %s%sSConstruct' % (wpath, os.sep)
]
test.must_contain_all_lines(test.stdout(), expect)

# Ensure that reutrns with stop are handled properly

test.write('SConstruct', """\
foo = "bar"
Return("foo", stop=True)
print("SConstruct")
""")

test.run(arguments="--debug=sconscript .")
test.must_contain_all_lines(test.stdout(), expect)

test.pass_test()

# Local Variables:
Expand Down