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

Properly handle import-only files that forward other files #129

Open
jathak opened this issue Nov 26, 2019 · 0 comments · May be fixed by #130

Comments

@jathak
Copy link
Member

@jathak jathak commented Nov 26, 2019

Right now, a case like:

// entrypoint.scss
@import "direct";

a {
  b: $direct;
  c: $indirect;
}

// _direct.scss
@use "indirect";

$direct: indirect.$indirect + 1;

// _direct.import.scss
@forward "direct";
@forward "indirect";

is incorrectly migrated to

// entrypoint.scss
@use "direct";

a {
  b: direct.$direct;
  c: direct.$indirect;
}

because the migrator doesn't properly account for the @forward "indirect" going away when migrating from @import to @use.

Fixing this is necessary for the output of #128 to be usable.

jathak added a commit that referenced this issue Dec 3, 2019
Fixes #129.

The migrator should now correctly identify forwards that are missing
when switching from an import-only file to the regular file.

This will allow libraries to require stricter dependencies for their
users when those users migrate to the module system, without breaking
`@import` users that depend on implicit dependencies.
jathak added a commit that referenced this issue Dec 3, 2019
Fixes #129.

The migrator should now correctly identify forwards that are missing
when switching from an import-only file to the regular file.

This will allow libraries to require stricter dependencies for their
users when those users migrate to the module system, without breaking
`@import` users that depend on implicit dependencies.
jathak added a commit that referenced this issue Dec 3, 2019
Fixes #129.

The migrator should now correctly identify forwards that are missing
when switching from an import-only file to the regular file.

This will allow libraries to require stricter dependencies for their
users when those users migrate to the module system, without breaking
`@import` users that depend on implicit dependencies.
jathak added a commit that referenced this issue Dec 3, 2019
Fixes #129.

The migrator should now correctly identify forwards that are missing
when switching from an import-only file to the regular file.

This will allow libraries to require stricter dependencies for their
users when those users migrate to the module system, without breaking
`@import` users that depend on implicit dependencies.
@jathak jathak linked a pull request that will close this issue Dec 3, 2019
jathak added a commit that referenced this issue Dec 3, 2019
Fixes #129.

The migrator should now correctly identify forwards that are missing
when switching from an import-only file to the regular file.

This will allow libraries to require stricter dependencies for their
users when those users migrate to the module system, without breaking
`@import` users that depend on implicit dependencies.
jathak added a commit that referenced this issue Dec 3, 2019
Fixes #129.

The migrator should now correctly identify forwards that are missing
when switching from an import-only file to the regular file.

This will allow libraries to require stricter dependencies for their
users when those users migrate to the module system, without breaking
`@import` users that depend on implicit dependencies.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.