11use crate :: diagnostics:: { ExtractionStep , emit_extraction_diagnostics} ;
22use crate :: rust_analyzer:: path_to_file_id;
3- use crate :: translate:: { ResolvePaths , SourceKind } ;
3+ use crate :: translate:: SourceKind ;
44use crate :: trap:: TrapId ;
55use anyhow:: Context ;
66use archive:: Archiver ;
@@ -54,7 +54,6 @@ impl<'a> Extractor<'a> {
5454 & mut self ,
5555 rust_analyzer : & RustAnalyzer ,
5656 file : & Path ,
57- resolve_paths : ResolvePaths ,
5857 source_kind : SourceKind ,
5958 ) {
6059 self . archiver . archive ( file) ;
@@ -79,7 +78,6 @@ impl<'a> Extractor<'a> {
7978 label,
8079 line_index,
8180 semantics_info. as_ref ( ) . ok ( ) ,
82- resolve_paths,
8381 source_kind,
8482 ) ;
8583
@@ -120,13 +118,11 @@ impl<'a> Extractor<'a> {
120118 file : & Path ,
121119 semantics : & Semantics < ' _ , RootDatabase > ,
122120 vfs : & Vfs ,
123- resolve_paths : ResolvePaths ,
124121 source_kind : SourceKind ,
125122 ) {
126123 self . extract (
127124 & RustAnalyzer :: new ( vfs, semantics) ,
128125 file,
129- resolve_paths,
130126 source_kind,
131127 ) ;
132128 }
@@ -140,7 +136,6 @@ impl<'a> Extractor<'a> {
140136 self . extract (
141137 & RustAnalyzer :: WithoutSemantics { reason } ,
142138 file,
143- ResolvePaths :: No ,
144139 source_kind,
145140 ) ;
146141 }
@@ -283,16 +278,15 @@ fn main() -> anyhow::Result<()> {
283278 }
284279 let cwd = cwd ( ) ?;
285280 let ( cargo_config, load_cargo_config) = cfg. to_cargo_config ( & cwd) ;
286- let resolve_paths = ResolvePaths :: No ;
287- let ( library_mode, library_resolve_paths) = if cfg. extract_dependencies_as_source {
288- ( SourceKind :: Source , resolve_paths)
281+ let library_mode = if cfg. extract_dependencies_as_source {
282+ SourceKind :: Source
289283 } else {
290- ( SourceKind :: Library , ResolvePaths :: No )
284+ SourceKind :: Library
291285 } ;
292- let ( source_mode, source_resolve_paths ) = if cfg. force_library_mode {
293- ( library_mode, library_resolve_paths )
286+ let source_mode = if cfg. force_library_mode {
287+ library_mode
294288 } else {
295- ( SourceKind :: Source , resolve_paths )
289+ SourceKind :: Source
296290 } ;
297291 let mut processed_files: HashSet < PathBuf , RandomState > =
298292 HashSet :: from_iter ( files. iter ( ) . cloned ( ) ) ;
@@ -312,7 +306,6 @@ fn main() -> anyhow::Result<()> {
312306 file,
313307 & semantics,
314308 vfs,
315- source_resolve_paths,
316309 source_mode,
317310 ) ,
318311 Err ( reason) => extractor. extract_without_semantics ( file, source_mode, & reason) ,
@@ -331,7 +324,6 @@ fn main() -> anyhow::Result<()> {
331324 file,
332325 & semantics,
333326 vfs,
334- library_resolve_paths,
335327 library_mode,
336328 ) ;
337329 extractor. archiver . archive ( file) ;
0 commit comments