sass / dart-sass

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

Implement access tracking for containingUrl #2220

Closed ntkme closed 4 months ago

ntkme commented 5 months ago

This PR adds a CanonicalizeContext class in dart which is able to track if containingUrl is accessed or not, it also changes the dart2js JSCanonicalizeContext class to be a wrapper, so that the containingUrl in JS would lazily access the dart containingUrl method instead of eagerly during construction. Finally for embedded host, this adds a containingUrlWithoutMarking method that allow the serialization of embedded protocol without marking, and we can mark it accordingly depends on the result from host.

https://github.com/sass/sass/pull/3835 https://github.com/sass/embedded-host-node/pull/285