sass / dart-sass

The reference implementation of Sass, written in Dart.
https://sass-lang.com/dart-sass
MIT License
3.98k stars 357 forks source link

Quiet-deps flag still showing "Global built-in functions are deprecated and will" deprecation warning (not others) #2418

Open BrumGB opened 1 month ago

BrumGB commented 1 month ago

Hey, annoyingly we're unable to upgrade our third party dependencies for the time being but would love to get our frontend working with the latest version of dart-sass 1.8.*

We're currently running our sass built script as so sass --load-path=./node_modules --quiet-deps scss/uos.scss css/uos.css

This works great and the dependencies don't throw warnings like they do when omitting --quiet-deps however, we do still seem to get this error coming through.

Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.
Use meta.type-of instead.

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

    ╷
159 │       @if(type-of($grid-margin-gutters) == 'map' and map-has-key($grid-margin-gutters, $-zf-size)) {
    │           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ╵
    node_modules/foundation-sites/scss/xy-grid/_classes.scss 159:11  @content

This only seems to happen with this specific deprecation warning Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.

I can't seem to find out why this is happening looking through the docs. I'm aware I can add the flag --silence-deprecation for the above warning, but I would ideally like to keep this for our code (just not the third party dependencies)

Thank you, and apologies if I've missed anything.

nex3 commented 1 month ago

Can you provide a repo that can reproduce this?

katzmo commented 1 week ago

We've run into the same issue, would be great to have this fixed in the next release!

Minimal example for reproducing

package.json:

{
  "dependencies": {
    "foundation-sites": "^6.9.0",
    "sass": "^1.81.0"
  }
}

style.scss:

@import "foundation-sites/scss/foundation";
@include foundation-everything;

CLI: sass --quiet-deps style.scss style.css (with matching load path)

Expected output

1 deprecation warning for using @import.

Actual output

Lots of additional deprecation warnings for global built-in functions somewhere in foundation’s scss.