This repository was archived by the owner on May 15, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +15
-4
lines changed Expand file tree Collapse file tree 4 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 7
7
8
8
* Allow ` ImportResponse.result ` to be null.
9
9
10
+ * Fix a bug where the compiler could return a ` CompileFailure ` without a span.
11
+
10
12
## 1.0.0-beta.14
11
13
12
14
* Support ` FileImporter ` s.
Original file line number Diff line number Diff line change 5
5
import 'dart:io' ;
6
6
import 'dart:convert' ;
7
7
8
+ import 'package:path/path.dart' as p;
8
9
import 'package:sass/sass.dart' as sass;
9
10
import 'package:stream_channel/stream_channel.dart' ;
10
11
@@ -100,7 +101,11 @@ void main(List<String> args) {
100
101
..failure = (OutboundMessage_CompileResponse_CompileFailure ()
101
102
..message = error.path == null
102
103
? error.message
103
- : "${error .message }: ${error .path }" );
104
+ : "${error .message }: ${error .path }"
105
+ ..span = (SourceSpan ()
106
+ ..start = SourceSpan_SourceLocation ()
107
+ ..end = SourceSpan_SourceLocation ()
108
+ ..url = p.toUri (request.path).toString ()));
104
109
}
105
110
break ;
106
111
Original file line number Diff line number Diff line change 1
1
name : sass_embedded
2
- version : 1.0.0-dev
2
+ version : 1.0.0-beta.15
3
3
description : An implementation of the Sass embedded protocol using Dart Sass.
4
4
homepage : https://github.com/sass/dart-sass-embedded
5
5
@@ -12,6 +12,7 @@ executables:
12
12
dependencies :
13
13
async : " >=1.13.0 <3.0.0"
14
14
meta : ^1.1.0
15
+ path : ^1.6.0
15
16
protobuf : ^2.0.0
16
17
sass : ^1.42.0
17
18
sass_api : ^1.0.0-beta.5
@@ -24,7 +25,6 @@ dev_dependencies:
24
25
cli_pkg : ^1.4.0
25
26
grinder : ^0.9.0
26
27
protoc_plugin : ^20.0.0
27
- path : ^1.6.0
28
28
test : ^1.0.0
29
29
test_descriptor : ^2.0.0
30
30
yaml : ^3.1.0
Original file line number Diff line number Diff line change @@ -300,7 +300,11 @@ void main() {
300
300
expect (failure.message, startsWith ("Cannot open file: " ));
301
301
expect (failure.message.replaceFirst ("Cannot open file: " , "" ).trim (),
302
302
equalsPath (d.path ('test.scss' )));
303
- expect (failure.span, equals (SourceSpan ()));
303
+ expect (failure.span.text, equals ('' ));
304
+ expect (failure.span.context, equals ('' ));
305
+ expect (failure.span.start, equals (SourceSpan_SourceLocation ()));
306
+ expect (failure.span.end, equals (SourceSpan_SourceLocation ()));
307
+ expect (failure.span.url, equals (p.toUri (d.path ('test.scss' )).toString ()));
304
308
expect (failure.stackTrace, isEmpty);
305
309
await process.kill ();
306
310
});
You can’t perform that action at this time.
0 commit comments