test: regression test for @container mixin parameter variable resolution#4420
Open
test: regression test for @container mixin parameter variable resolution#4420
Conversation
Co-authored-by: matthew-dean <414752+matthew-dean@users.noreply.github.com>
Co-authored-by: matthew-dean <414752+matthew-dean@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix mixins with parameters not compiling correctly
test: regression test for @container mixin parameter variable resolution
Mar 11, 2026
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
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.
Using mixin parameters as both the container name and query condition in
@containerat-rules failed with "variable @bp is undefined" in Less 4.4.2–4.5.1.The underlying bugs were fixed in v4.6.0 via three separate commits:
QueryInParens.evalrewrite — old code mutated node state in-place and conditionally restored from a deep copy only when variable declarations were found in frames; rewritten to always return a fresh evaluated node, eliminating the mutation/context-sensitivity_evaluatedflag onContainer— prevents double evaluation when the container node is re-encountered in the parent ruleset's eval loop after being returned from the mixinfunctionRegistrynull guard —context.frames[0].functionRegistry.inherit()now guarded againstundefined, matching the defensive pattern inmixin-definition.jsThis PR adds the missing regression test covering variable container names combined with variable query conditions inside mixin calls, including multiple calls with differing parameters.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.