Skip to content

Commit 41f5e1f

Browse files
committed
Stop holding onto stack traces for every CSS declaration
Closes #2663
1 parent b8b35e8 commit 41f5e1f

File tree

10 files changed

+17
-17
lines changed

10 files changed

+17
-17
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.93.3
2+
3+
* Fix a performance regression that was introduced in 1.92.0.
4+
15
## 1.93.2
26

37
* No user-visible changes.

lib/src/ast/css/declaration.dart

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// https://opensource.org/licenses/MIT.
44

55
import 'package:source_span/source_span.dart';
6-
import 'package:stack_trace/stack_trace.dart';
76

87
import '../../value.dart';
98
import 'node.dart';
@@ -17,12 +16,6 @@ abstract interface class CssDeclaration implements CssNode {
1716
/// The value of this declaration.
1817
CssValue<Value> get value;
1918

20-
/// The stack trace indicating where this node was created.
21-
///
22-
/// This is used to emit interleaved declaration warnings, and is only set if
23-
/// [interleavedRules] isn't empty.
24-
Trace? get trace;
25-
2619
/// The span for [value] that should be emitted to the source map.
2720
///
2821
/// When the declaration's expression is just a variable, this is the span

lib/src/ast/css/modifiable/declaration.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// https://opensource.org/licenses/MIT.
44

55
import 'package:source_span/source_span.dart';
6-
import 'package:stack_trace/stack_trace.dart';
76

87
import '../../../value.dart';
98
import '../../../visitor/interface/modifiable_css.dart';
@@ -17,7 +16,6 @@ final class ModifiableCssDeclaration extends ModifiableCssNode
1716
final CssValue<String> name;
1817
final CssValue<Value> value;
1918
final bool parsedAsCustomProperty;
20-
final Trace? trace;
2119
final FileSpan valueSpanForMap;
2220
final FileSpan span;
2321

@@ -29,7 +27,6 @@ final class ModifiableCssDeclaration extends ModifiableCssNode
2927
this.value,
3028
this.span, {
3129
required this.parsedAsCustomProperty,
32-
this.trace,
3330
FileSpan? valueSpanForMap,
3431
}) : valueSpanForMap = valueSpanForMap ?? value.span {
3532
if (parsedAsCustomProperty) {

lib/src/visitor/async_evaluate.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1371,7 +1371,6 @@ final class _EvaluateVisitor
13711371
CssValue(value, expression.span),
13721372
node.span,
13731373
parsedAsCustomProperty: node.isCustomProperty,
1374-
trace: _stackTrace(node.span),
13751374
valueSpanForMap:
13761375
_sourceMap ? node.value.andThen(_expressionNode)?.span : null,
13771376
),

lib/src/visitor/evaluate.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// DO NOT EDIT. This file was generated from async_evaluate.dart.
66
// See tool/grind/synchronize.dart for details.
77
//
8-
// Checksum: b79ed685f78b8d5356795eb2d1112f830abaf58e
8+
// Checksum: 02a6149a29eca1d21306e9582a6b7df86f4cd2f2
99
//
1010
// ignore_for_file: unused_import
1111

@@ -1379,7 +1379,6 @@ final class _EvaluateVisitor
13791379
CssValue(value, expression.span),
13801380
node.span,
13811381
parsedAsCustomProperty: node.isCustomProperty,
1382-
trace: _stackTrace(node.span),
13831382
valueSpanForMap:
13841383
_sourceMap ? node.value.andThen(_expressionNode)?.span : null,
13851384
),

pkg/sass-parser/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.4.32
2+
3+
* No user-visible changes.
4+
15
## 0.4.31
26

37
* No user-visible changes.

pkg/sass-parser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sass-parser",
3-
"version": "0.4.31",
3+
"version": "0.4.32",
44
"description": "A PostCSS-compatible wrapper of the official Sass parser",
55
"repository": "sass/sass",
66
"author": "Google Inc.",

pkg/sass_api/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 15.12.3
2+
3+
* No user-visible changes.
4+
15
## 15.12.2
26

37
* No user-visible changes.

pkg/sass_api/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ name: sass_api
22
# Note: Every time we add a new Sass AST node, we need to bump the *major*
33
# version because it's a breaking change for anyone who's implementing the
44
# visitor interface(s).
5-
version: 15.12.2
5+
version: 15.12.3
66
description: Additional APIs for Dart Sass.
77
homepage: https://github.com/sass/dart-sass
88

99
environment:
1010
sdk: ">=3.6.0 <4.0.0"
1111

1212
dependencies:
13-
sass: 1.93.2
13+
sass: 1.93.3
1414

1515
dev_dependencies:
1616
dartdoc: ^8.0.14

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: sass
2-
version: 1.93.2
2+
version: 1.93.3
33
description: A Sass implementation in Dart.
44
homepage: https://github.com/sass/dart-sass
55

0 commit comments

Comments
 (0)