Fix compile_commands.json having incorrect include paths for clean builds when a variant dir is used, duplicate=0, and a relative CPPPATH is used in a child SConscript#4852
Open
mon wants to merge 1 commit intoSCons:masterfrom
Conversation
Contributor
|
Can you change the description to be more informative than "some scenarios"? it's not useful and won't help anyone trying to figure out if the release will fix their problem. |
…ilds when a variant dir is used, duplicate=0, and a relative CPPPATH is used in a child SConscript Assisted-by: Claude Opus 4.7
Author
|
Yeah good point, I was worried about making the commit message too long but it's a bit useless. This better? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have a somewhat complicated build that uses variants,
duplicate=0, and a relative include path in a child Sconscript.On a clean build (and only on a clean build),
built()is called on the target which wipes itscwdin the name of reduced memory use; but when the compiledb is generated, it needs this information to emit accurate include paths, so they end up pointing nowhere useful.The cwd that gets set to None hangs around in memory anyway as part of the entire Dir tree, so by just not clearing it, the compiledb is accurate to the actual executed command.
AI disclaimer
This was a nasty thing to triage, Claude helped whittle down my big repo to a minimal repro case and wrote the testcase. I stopped it from doing large architectural changes to fix the issue. Changelog/this PR is all human written.
Contributor Checklist:
CHANGES.txtandRELEASE.txt(and read theREADME.rst).