This also adds a Value.tryMap() function, which was useful for
implementing this and may be more generally useful to users as well.
See sass/sass#2836
See sass/sass-spec#1560
This also adds a Value.tryMap() function, which was useful for
implementing this and may be more generally useful to users as well.
See sass/sass#2836
See sass/sass-spec#1560
This also adds a Value.tryMap() function, which was useful for
implementing this and may be more generally useful to users as well.
See sass/sass#2836
See sass/sass-spec#1560
Fixes#1002.
In the indented syntax, a selector list may continue onto another line
if the previous line ends with a comma. Previously, if there was a
comment after the comma, it wouldn't be recognized and the selector
would be broken in two (with the first selector having no properties).
This fixes the parser to ignore comments when looking for the comma at
the end of a line.
Also disables the formatting check to work around dart-lang/dart_style#940.
Avoid adding duplicate modules when importing forwarded stylesheets
In Google stylesheets that imported import-only stylesheets with many
forwards many of times, we were seeing Environment._globalModules grow
large enough that variable accesses were a problem. This addresses
that in several ways:
* Forwarded modules are now ignored if the module is already being
forwarded.
* Module equality is more intelligent, so that shadowed and forwarded
modules can be effectively de-duplicated.
* If a module would be fully shadowed by a later import *and* that
module has no CSS, we no longer add an empty ShadowedModule to the
module list.
This combines all targets into a single extender invocation, which is
more efficient and allows it to more aggressively do redundant
selector elimination.
Prior to this, the watcher handled all the logic around recompiling
stylesheets if an upstream file was deleted or added in a way that
could affect their import resolution. This left a gap where the
stylesheet graph wouldn't be aware that a newly-added file had become
upstream dependency of an existing downstream file, leading to
recompilation failures.
This commit fixes that by moving all that logic into the stylesheet
graph. The graph now has full and sole responsibility for providing a
consistent view of which stylesheets depend on one another even as the
shape of the graph changes, and the watcher is just a client of that
logic.
Closes#550