@@ -14,11 +14,12 @@ use resolver::{
14
14
ingot:: { source_files:: SourceFiles , Ingot , IngotResolver } ,
15
15
Resolver ,
16
16
} ;
17
+ use tracing:: error;
17
18
use url:: Url ;
18
19
19
20
pub fn run ( opts : & Options ) {
20
21
match & opts. command {
21
- Command :: Build => eprintln ! ( "`fe build` doesn't work at the moment" ) ,
22
+ Command :: Build => error ! ( "`fe build` doesn't work at the moment" ) ,
22
23
Command :: Check { path, core } => {
23
24
let mut db = DriverDataBase :: default ( ) ;
24
25
let mut ingot_resolver = IngotResolver :: default ( ) ;
@@ -36,9 +37,9 @@ pub fn run(opts: &Options) {
36
37
let core_base_url = Url :: parse ( "core-ingot:///" ) . unwrap ( ) ;
37
38
let diagnostics = ingot_resolver. take_diagnostics ( ) ;
38
39
if !diagnostics. is_empty ( ) {
39
- eprintln ! ( "an error was encountered while resolving `{core_path}`" ) ;
40
+ error ! ( "an error was encountered while resolving `{core_path}`" ) ;
40
41
for diagnostic in diagnostics {
41
- eprintln ! ( "{diagnostic}" )
42
+ error ! ( "{diagnostic}" )
42
43
}
43
44
std:: process:: exit ( 2 )
44
45
}
@@ -61,19 +62,19 @@ pub fn run(opts: &Options) {
61
62
core_base_url
62
63
}
63
64
Ok ( Ingot :: SingleFile { .. } ) => {
64
- eprintln ! ( "standalone core ingot not supported" ) ;
65
+ error ! ( "standalone core ingot not supported" ) ;
65
66
std:: process:: exit ( 2 )
66
67
}
67
68
Ok ( _) => {
68
- eprintln ! ( "an error was encountered while resolving `{core_path}`" ) ;
69
+ error ! ( "an error was encountered while resolving `{core_path}`" ) ;
69
70
for diagnostic in ingot_resolver. take_diagnostics ( ) {
70
- eprintln ! ( "{diagnostic}" )
71
+ error ! ( "{diagnostic}" )
71
72
}
72
73
std:: process:: exit ( 2 )
73
74
}
74
75
Err ( error) => {
75
- eprintln ! ( "an error was encountered while resolving `{core_path}`" ) ;
76
- eprintln ! ( "{error}" ) ;
76
+ error ! ( "an error was encountered while resolving `{core_path}`" ) ;
77
+ error ! ( "{error}" ) ;
77
78
std:: process:: exit ( 2 )
78
79
}
79
80
}
@@ -95,9 +96,9 @@ pub fn run(opts: &Options) {
95
96
96
97
let diagnostics = ingot_resolver. take_diagnostics ( ) ;
97
98
if !diagnostics. is_empty ( ) {
98
- eprintln ! ( "an error was encountered while resolving `{path}`" ) ;
99
+ error ! ( "an error was encountered while resolving `{path}`" ) ;
99
100
for diagnostic in diagnostics {
100
- eprintln ! ( "{diagnostic}" )
101
+ error ! ( "{diagnostic}" )
101
102
}
102
103
std:: process:: exit ( 2 )
103
104
}
@@ -124,12 +125,12 @@ pub fn run(opts: &Options) {
124
125
}
125
126
Ok ( _) => {
126
127
for diagnostic in ingot_resolver. take_diagnostics ( ) {
127
- eprintln ! ( "{diagnostic}" )
128
+ error ! ( "{diagnostic}" )
128
129
}
129
130
std:: process:: exit ( 2 )
130
131
}
131
132
Err ( error) => {
132
- eprintln ! ( "{error}: {path}" ) ;
133
+ error ! ( "{error}: {path}" ) ;
133
134
std:: process:: exit ( 2 )
134
135
}
135
136
} ;
@@ -144,7 +145,7 @@ pub fn run(opts: &Options) {
144
145
std:: process:: exit ( 1 ) ;
145
146
}
146
147
}
147
- Command :: New => eprintln ! ( "`fe new` doesn't work at the moment" ) ,
148
+ Command :: New => error ! ( "`fe new` doesn't work at the moment" ) ,
148
149
}
149
150
}
150
151
0 commit comments