Repository navigation
Fix @plugin scoping rules - #2522
Merged
Merged
Conversation
Fixed scope for plugins to apply correctly for mixins, directives and detached rulesets. Updated plugin unit tests to be more comprehensive
functionRegistry was mistakingly inheriting from the top frame of the caller context, which was incorrect. It should inherit from definition scope.
Merged
Member
There was a problem hiding this comment.
was this file checked in by mistake?
Contributor
Author
Oops. Yes. I thought I flagged that one as 'do not commit'. Maybe the GitHub client glitched. |
Contributor
Author
|
There we go. Deleted and ammended. |
Contributor
Author
There was a problem hiding this comment.
import and plugin directives inside detached rulesets didn't work as expected because the visitor was stopping at the rule level, never entering the detached ruleset declaration.
This change enables it for the simple form of @var : { ... } and verifies that scoping for plugin works as expected in that scenario. You may want to not take this particular change. Just notifying and trying to be clear.
Closed
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.
This pull request fixes remaining scoping issues with the
@pluginmechanic that #2479 introduced.@plugininside a directive block is now in scope for descendants of the directive block.@pluginto cover scope inheritance and shadowing cases.