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

[Bug Report][2.5.0] New Sass Deprecation Recommended #13694

Closed
Daniel4Digital opened this issue May 21, 2021 · 12 comments
Closed

[Bug Report][2.5.0] New Sass Deprecation Recommended #13694

Daniel4Digital opened this issue May 21, 2021 · 12 comments
Assignees
Labels
has workaround T: enhancement Functionality that enhances existing features upstream Problem with a third party library that we may have to work around
Milestone

Comments

@Daniel4Digital
Copy link

Environment

Vuetify Version: 2.5.0
Vue Version: 2.6.12
Browsers: Chrome 90.0.4430.212
OS: Windows 10

Steps to reproduce

npm run build

Expected Behavior

Should not give warnings about sass

Actual Behavior

gives a lot of recommendations warnings of near future deprecated syntax

Reproduction Link

https://codesandbox.io/s/nuxtjs-vuetify-forked-nrfuw

@ghost ghost added the S: triage label May 21, 2021
@grreeenn
Copy link

grreeenn commented May 21, 2021

same here. Got 64 warnings about using / for division, like this one:

DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div($grid-gutter, 6)

More info and automated migrator: https://sass-lang.com/d/slash-div

   ╷
62 │     'sm': $grid-gutter / 6,
   │           ^^^^^^^^^^^^^^^^
   ╵
    node_modules/vuetify/src/styles/settings/_variables.scss 62:11      @import
    node_modules/vuetify/src/styles/settings/_index.sass 1:9            @import
    node_modules/vuetify/src/styles/styles.sass 2:9                     @import
    node_modules/vuetify/src/components/VDataTable/_variables.scss 1:9  @import
    stdin 2:9                                                           root stylesheet

DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div($grid-gutter, 6)

More info and automated migrator: https://sass-lang.com/d/slash-div

Happened after I started using treeshaking (imported Vuetify from vuetify/lib, as ped documentation).

Fresh install

@jacekkarczmarczyk
Copy link
Member

jacekkarczmarczyk commented May 21, 2021

use node sass < 1.33 as workaround

@grreeenn
Copy link

@jacekkarczmarczyk I've just changed to sass as per this comment.

node-sass didn't work at all

@jacekkarczmarczyk
Copy link
Member

yeah a meant dart sass, updated my comment

@grreeenn
Copy link

@jacekkarczmarczyk it worked, thanks :)

@jacekkarczmarczyk jacekkarczmarczyk added has workaround T: bug Functionality that does not work as intended/expected upstream Problem with a third party library that we may have to work around and removed S: triage labels May 21, 2021
@KaelWD KaelWD added this to the v2.5.x milestone May 21, 2021
RubenNL added a commit to RubenNL/vuetify that referenced this issue May 24, 2021
@kiledal

This comment has been minimized.

@Oleksii14

This comment has been minimized.

@KaelWD

This comment has been minimized.

@Oleksii14

This comment has been minimized.

@Oleksii14
Copy link

Oleksii14 commented May 28, 2021

@KaelWD sorry, my bad. I have installed a bad version of sass.
My current versions:

sass - 1.34.0
vuetify - 2.5.1

No warnings!

UPD:

Warnings will persist since vue v2.6.12 does not support sass-loader v11

@KaelWD KaelWD closed this as completed in 52c98d5 Jun 1, 2021
@KaelWD KaelWD self-assigned this Jun 1, 2021
@KaelWD KaelWD reopened this Jun 2, 2021
@KaelWD KaelWD removed this from the v2.5.x milestone Jun 2, 2021
@KaelWD KaelWD added wontfix The issue is expected and will not be fixed and removed T: bug Functionality that does not work as intended/expected labels Jun 2, 2021
@KaelWD
Copy link
Member

KaelWD commented Jun 2, 2021

I'm reverting the fix for this, it completely broke projects that were injecting custom sass variables (#13737). To silence the warnings, install sass@~1.32

If you have any other questions, please join the Discord chat room.


Why is this marked as wontfix?

SASS has deprecated a very widely-used feature with no option to disable the deprecation notice (sass/dart-sass#1408, sass/sass#3065). The replacement for this (math.div()) is not compatible with the old @import module system as @use has to be the first statement in a file.
In v2.5.2 I attempted to replace @import with @use everywhere but this ended up not being viable as it breaks existing variable injection with @import, and breaks multiple variable injection as @use can only define each variable once.
Fixing these problems requires either changes to the SASS spec (unlikely), or a complete rethink of how we use SASS modules - possibly including custom loaders for webpack and rollup.

@KaelWD KaelWD pinned this issue Jun 2, 2021
@vuetifyjs vuetifyjs locked as resolved and limited conversation to collaborators Jun 2, 2021
KaelWD added a commit that referenced this issue Aug 29, 2021
@KaelWD KaelWD added this to the v3.0.0 milestone Aug 29, 2021
@KaelWD KaelWD added T: enhancement Functionality that enhances existing features and removed wontfix The issue is expected and will not be fixed labels Aug 29, 2021
@KaelWD
Copy link
Member

KaelWD commented Aug 29, 2021

This is fixed in Vuetify 3, you now have to use webpack-plugin-vuetify or vite-plugin-vuetify to change variables. Vuetify 2 is still limited to sass@~1.32

@KaelWD KaelWD closed this as completed Aug 29, 2021
@johnleider johnleider unpinned this issue Apr 23, 2022
valentinoli referenced this issue in hestiaAI/hestialabs-experiences Oct 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
has workaround T: enhancement Functionality that enhances existing features upstream Problem with a third party library that we may have to work around
Projects
None yet
6 participants