Stop propagating generated on macro arguments #14696
Merged
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.
Close #14676
Alternative to #14677
I've tried a couple approaches here, but eventually I think this is probably the way to go:
stop_generated: true
Also tried:
unquote
s as originally discussed: I think this is the wrong thing to consider, since macros internally might be building AST by callingquote
multiple times and injecting smaller blocks into bigger blocks => what we want is to stop at macro args, no matter how the macro is implemented internally?quote
+Macro.expand
in the shell or testsstop_generated
,stop_linify: true
altogether (since we probably shouldn't add lines of the macro in injected args?) => seems reasonable but breaks withleft
variables undefined in ExUnit, I could try to fix it but figured this might be too risky of a changeThe current
stop_generated
approach still breaks some tests though, so I'm not 100% sure it's the right approach.