Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix @forward statement altering the scope of the forwarded module #85

Merged
merged 3 commits into from
Sep 28, 2023

Conversation

kketch
Copy link
Contributor

@kketch kketch commented Sep 21, 2023

When using the @forward statement multiple times on the same module, there was an unintended mutation of the loaded module scope. Using @forward "path" as prefix-*; would change the scope for a module loaded without a prefix too or with a different prefix, resulting in errors such as "Undefined mixin" or "Undefined function".

I initially found the issue while trying to compile Carbon Design System SCSS style with grass.

The scope built for a particular forward statement in now directly included on the ForwardedModule type just like how its done for the ShadowedModule type.

@connorskees
Copy link
Owner

Thank you for this change. I will try to release this to crates.io in a bugfix version sometime next week. In the meantime, you should be able to use a git dependency to access these changes.

The test and CLI fixes are appreciated!

@connorskees connorskees merged commit f7f620e into connorskees:master Sep 28, 2023
4 checks passed
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.

None yet

2 participants