Handle --debug containing memoizer#4677
Merged
bdbaddog merged 1 commit intoSCons:masterfrom Feb 3, 2025
Merged
Conversation
The memoizer statistics have to be handled specially as they use conditional decorators, those have to be enabled before any of the decorated methods are read by Python. This worked if there was exactly "--debug=memoizer" on the commandline or in SCONSFLAGS, but not if it was in a multi-value option like "--debug=presub,memoizer". Handle the up-front-check a little more completely to fix this. Signed-off-by: Mats Wichmann <mats@linux.com>
mwichmann
commented
Feb 3, 2025
| expect = [ | ||
| "Memoizer (memory cache) hits and misses", | ||
| "Base.stat()", | ||
| # "Memoizer (memory cache) hits and misses", |
Collaborator
Author
There was a problem hiding this comment.
This one commented out because it prints even if the memoizer failed to initialize, since the actual heading/print-when-done is handled by the normal option processing, not the special up-front processing. Since the match requires "at least one of" it would still match and obscure the failure in the combined-debug-option case.
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.
The memoizer statistics have to be handled specially as they use conditional decorators, those have to be enabled before any of the decorated methods are read by Python. This worked if there was exactly
--debug=memoizeron the commandline or inSCONSFLAGS, but not if it was in a multi-value option like--debug=presub,memoizer. Handle the up-front-check a little more completely to fix this.No doc impacts, documented behavior not changed.
Contributor Checklist:
CHANGES.txtandRELEASE.txt(and read theREADME.rst).