Skip to content

Conversation

@philipp-spiess
Copy link
Member

@philipp-spiess philipp-spiess commented Feb 6, 2025

Fixes #16298

This PR fixes an issue where using an AST walk in combination with replaceNode and various SkipAction would either cause children to be visited multiple times or not visited at all even though it should. This PR fixes the issue which also means we can get rid of a custom walk for @variant inside the @media that was used to apply @variant because we never recursively visited children inside the @media rule.

Because we now can use the regular walk for @variant, we now properly convert @variant to @custom-variant inside @reference-ed stylesheet which also fixes #16298

Test plan

Lots of tests added to ensure the combinations of WalkAction and replaceWith() works as expected.

@philipp-spiess philipp-spiess force-pushed the fix/properly-handle-skip-with-replace branch from 4a7d014 to 32ca102 Compare February 6, 2025 12:21
@philipp-spiess philipp-spiess force-pushed the fix/properly-handle-skip-with-replace branch from 32ca102 to 39a5180 Compare February 6, 2025 12:22
@philipp-spiess philipp-spiess marked this pull request as ready for review February 6, 2025 12:39
@philipp-spiess philipp-spiess requested a review from a team as a code owner February 6, 2025 12:39
@RobinMalfait RobinMalfait merged commit 144581d into main Feb 6, 2025
5 checks passed
@RobinMalfait RobinMalfait deleted the fix/properly-handle-skip-with-replace branch February 6, 2025 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[v4] "Maximum call stack size exceeded" when using @resource with @slot

3 participants