Skip to content

Fix debug include printing for multi-source#4799

Merged
bdbaddog merged 1 commit intoSCons:masterfrom
mwichmann:maint/debug-include
Dec 14, 2025
Merged

Fix debug include printing for multi-source#4799
bdbaddog merged 1 commit intoSCons:masterfrom
mwichmann:maint/debug-include

Conversation

@mwichmann
Copy link
Collaborator

Rather obscure bug - if --debug=includes is selected, the analysis stopped after the first source file of a given target. For the common case of C/C++ projects, the object builders are single-source, so the problem would not be noticed.

Adds a distinct testcase, because the main debug-includes test uses the C compiler, which won't trigger this.

No doc impacts, although the documentation of the option could perhaps be a little more explicit.

Contributor Checklist:

  • I have created a new test or updated the unit tests to cover the new/changed functionality.
  • I have updated CHANGES.txt and RELEASE.txt (and read the README.rst).
  • I have updated the appropriate documentation

Rather obscure bug - if --debug=includes is selected, the analysis
stopped after the first source file of a given target. For the common
case of C/C++ projects, the object builders are single-source, so
the problem would not be noticed.

Signed-off-by: Mats Wichmann <mats@linux.com>
@mwichmann
Copy link
Collaborator Author

mwichmann commented Dec 14, 2025

Just so it's mentioned here, do the printouts make sense? For source file f2.in, we get this display:

+-f2.in
  +-a.inc
  | +-[a.inc]
  | +-b.inc
  |   +-[a.inc]
  |   +-[b.inc]
  +-[b.inc]

Why all the extra noise? a.inc doesn't depend on b.inc nor on itself, etc. The standard tree display doesn't do this:

+-.
  +-SConstruct
  +-a.inc
  +-b.inc
  +-f.out
  | +-f1.in
  | +-f2.in
  | +-a.inc
  | +-b.inc
  +-f1.in
  +-f2.in

@mwichmann
Copy link
Collaborator Author

hmmm, wonder if this is due to the Fake scanner... may need to be a little bit more clever on that.

@bdbaddog bdbaddog merged commit fb47b6b into SCons:master Dec 14, 2025
9 checks passed
@mwichmann mwichmann added this to the NextRelease milestone Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants