File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
crates/rust-analyzer/src/cli Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,9 @@ xflags::xflags! {
112
112
113
113
cmd scip {
114
114
required path: PathBuf
115
+
116
+ /// The output path where the SCIP file will be written to. Defaults to `index.scip`.
117
+ optional --output path: PathBuf
115
118
}
116
119
}
117
120
}
@@ -208,6 +211,7 @@ pub struct Lsif {
208
211
#[ derive( Debug ) ]
209
212
pub struct Scip {
210
213
pub path : PathBuf ,
214
+ pub output : Option < PathBuf > ,
211
215
}
212
216
213
217
impl RustAnalyzer {
Original file line number Diff line number Diff line change 2
2
3
3
use std:: {
4
4
collections:: { HashMap , HashSet } ,
5
+ path:: PathBuf ,
5
6
time:: Instant ,
6
7
} ;
7
8
@@ -165,7 +166,8 @@ impl flags::Scip {
165
166
special_fields : Default :: default ( ) ,
166
167
} ;
167
168
168
- scip:: write_message_to_file ( "index.scip" , index)
169
+ let out_path = self . output . unwrap_or_else ( || PathBuf :: from ( r"index.scip" ) ) ;
170
+ scip:: write_message_to_file ( out_path, index)
169
171
. map_err ( |err| anyhow:: anyhow!( "Failed to write scip to file: {}" , err) ) ?;
170
172
171
173
eprintln ! ( "Generating SCIP finished {:?}" , now. elapsed( ) ) ;
You can’t perform that action at this time.
0 commit comments