warn on filtered user traces#1347
Open
knoal wants to merge 2 commits into
Open
Conversation
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.
Summary
--trace-filter compiler-generatedremoves a user-definedtraceFixes #1326.
Context
The current behavior reported in #1326 still reproduces on
main: a user trace wrapped around a helper call can change the observable result under--trace-filter compiler-generated.A maintainer comment on the issue notes that this is arguably the intended behavior of the filter, but also that it deserves at least a warning from the compiler.
This PR takes that narrower path.
What changed
Tracing::CompilerGenerated(..)trace @"...": ...expression itselfTracing::CompilerGenerated(..)Tracing::All(..)orTracing::UserDefined(..)Validation
cargo test -p aiken-lang compiler_generated_filter_warns_for_user_trace -- --nocapturecargo test -p aiken-lang no_filtered_user_trace_warning_without_compiler_generated_filter -- --nocapturecargo run -q -p aiken -- check /tmp/aiken-1326-repro --seed 1 --max-success 1 --trace-level verbose --trace-filter compiler-generatedThe manual repro now still shows the existing pass/fail behavior, but also surfaces a warning directly on the filtered
trace @"user trace": ...expression.