File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ autotests = false # Most tests/*.rs files are modules of tests/main.rs
20
20
[dependencies ]
21
21
ahash = " 0.8.11"
22
22
apollo-parser = { path = " ../apollo-parser" , version = " 0.8.0" }
23
- ariadne = { version = " 0.4.1 " , features = [" auto-color" ] }
23
+ ariadne = { version = " 0.5.0 " , features = [" auto-color" ] }
24
24
indexmap = " 2.0.0"
25
25
rowan = " 0.15.5"
26
26
serde = { version = " 1.0" , features = [" derive" ] }
Original file line number Diff line number Diff line change @@ -204,17 +204,17 @@ impl<'s> CliReport<'s> {
204
204
main_location : Option < SourceSpan > ,
205
205
color : Color ,
206
206
) -> Self {
207
- let ( file_id , range ) = main_location
207
+ let span = main_location
208
208
. and_then ( to_span)
209
209
. unwrap_or ( ( FileId :: NONE , 0 ..0 ) ) ;
210
- let report = ariadne:: Report :: build ( ReportKind :: Error , file_id , range . start ) ;
210
+ let report = ariadne:: Report :: build ( ReportKind :: Error , span ) ;
211
211
let enable_color = match color {
212
212
Color :: Never => false ,
213
213
// Rely on ariadne's `auto-color` feature, which uses `concolor` to enable colors
214
214
// only if stderr is a terminal.
215
215
Color :: StderrIsTerminal => true ,
216
216
} ;
217
- let config = ariadne:: Config :: default ( )
217
+ let config = ariadne:: Config :: new ( )
218
218
. with_index_type ( ariadne:: IndexType :: Byte )
219
219
. with_color ( enable_color) ;
220
220
Self {
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ rowan = "0.15.5"
22
22
thiserror = " 1.0.30"
23
23
24
24
[dev-dependencies ]
25
- ariadne = " 0.4 .0"
25
+ ariadne = " 0.5 .0"
26
26
indexmap = " 2.0.0"
27
27
anyhow = " 1.0.66"
28
28
pretty_assertions = " 1.3.0"
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ fn parse_schema() -> cst::Document {
31
31
// slice can have many errors.
32
32
let start = err. index ( ) ;
33
33
let end = start + err. data ( ) . len ( ) ;
34
- Report :: build ( ReportKind :: Error , file_name, start)
34
+ Report :: build ( ReportKind :: Error , ( file_name, start..end ) )
35
35
. with_message ( err. message ( ) )
36
36
. with_label ( Label :: new ( ( file_name, start..end) ) . with_message ( err. message ( ) ) )
37
37
. finish ( )
You can’t perform that action at this time.
0 commit comments