-
Notifications
You must be signed in to change notification settings - Fork 3.4k
build: fix SCSS division deprecation #12112
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes generally look fine, however, this is blocked by updating to gulp-sass v5.0.0 and that is blocked by updating to gulp v4, which we never intended to do...
Is there a way we could make it work without updating gulp? Because this will invevitably make it impossible to update sass for projects in the future which is a big problem. Or at least apply a build task at the end which run the command of sass-migrator? |
I've opened #12113 for updating to I've also opened #12114 to track the need to update to |
I don't think that we want to include sass-migrator in our build pipeline. Users who depend upon our Sass directly, could add that to their build pipeline. I would like to get onto a supported version of Sass ( Additionally, |
@superheri This should no longer be blocked as I was able to land a fix for #12114. Can you please rebase this PR? That should get the CI passing. |
49ca231
to
4038b46
Compare
It seems like the rebase is not fixing it... Did I do anything wrong? Sorry for the CLA, the thing is related with my account emails that have changed recently, I'm looking to fix this. |
4038b46
to
43014b1
Compare
OK, yeah there is still this issue: PluginError: dist/layouts/angular-material.layout-attributes.scss
Error: @use rules must be written before any other rules. |
I can reproduce locally, I'll try to investigate. |
When we build material/gulp/tasks/build-scss.js Lines 83 to 86 in 5e2d213
Due to using
This is likely something similar to the |
From what I see, almost all chunks of CSS produced starts with the _variables.scss file. Maybe adding the @use at the top of this file and setting it as the top most file for the only case that is not might fix our problem? |
Finally it seems to work but we really need to test correctly to make sure I did not break anything. |
While you are in there, can you please remove Lines 97 to 99 in b391c68
|
When I run the docs locally with your latest changes, I see the following working fine
So this looks good to me so far. I'll have to review the diffs of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you for your contribution here! Much appreciated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for taking the time to help me with this change. If there are anything about this I need to change, just tell me. |
Looks like we broke the module builds, I'll look into that and open a separate PR. |
- fixes module builds broken by PR #12112 - break module imports out into a separate file since it behaves differently than Sass variables. - add a new `hoistScssAtUseStatements()` function to deduplicates @use statements and move them to the top as required by Sass. - start testing the module and closure builds for every PR and don't let breaking changes get to `master` before we find them. - update CircleCI NodeJS image and comments about where to find new images - update caniuse-lite
- fixes module builds broken by PR #12112 - break module imports out into a separate file since it behaves differently than Sass variables. - add a new `hoistScssAtUseStatements()` function to deduplicates @use statements and move them to the top as required by Sass. - start testing the module and closure builds for every PR and don't let breaking changes get to `master` before we find them. - update CircleCI NodeJS image and comments about where to find new images - update caniuse-lite
- fixes module builds broken by PR #12112 - break module imports out into a separate file since it behaves differently than Sass variables. - add a new `hoistScssAtUseStatements()` function to deduplicates @use statements and move them to the top as required by Sass. - start testing the module and closure builds for every PR and don't let breaking changes get to `master` before we find them. - update CircleCI NodeJS image and comments about where to find new images - update caniuse-lite
PR #12138 fixes the module builds. |
- fixes module builds broken by PR #12112 - break module imports out into a separate file since it behaves differently than Sass variables. - add a new `hoistScssAtUseStatements()` function to deduplicates @use statements and move them to the top as required by Sass. - start testing the module and closure builds for every PR and don't let breaking changes get to `master` before we find them. - update CircleCI NodeJS image and comments about where to find new images - update caniuse-lite
AngularJS Material is in LTS mode
We are no longer accepting changes that are not critical bug fixes into this project.
See Long Term Support for more detail.
PR Checklist
Please check your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
When building with newer SASS version we get this deprecation message and many others :
Fixes #
What is the new behavior?
This changes the division notation in scss files so that it fits the new expected writing.
These changes where made using the sass-migrator that sass themselves are telling to use.
Does this PR introduce a breaking change?
Other information