File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -82,3 +82,11 @@ options:
82
82
title : Skip path resolution
83
83
description : >
84
84
Skip path resolution. This is experimental, while we move path resolution from the extractor to the QL library.
85
+ type : string
86
+ pattern : " ^(false|true)$"
87
+ extract_dependencies_as_source :
88
+ title : Extract dependencies as source code
89
+ description : >
90
+ Extract the full source code of dependencies instead of only extracting signatures.
91
+ type : string
92
+ pattern : " ^(false|true)$"
Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ pub struct Config {
67
67
pub extra_includes : Vec < PathBuf > ,
68
68
pub proc_macro_server : Option < PathBuf > ,
69
69
pub skip_path_resolution : bool ,
70
+ pub extract_dependencies_as_source : bool ,
70
71
}
71
72
72
73
impl Config {
Original file line number Diff line number Diff line change @@ -277,6 +277,11 @@ fn main() -> anyhow::Result<()> {
277
277
} else {
278
278
ResolvePaths :: Yes
279
279
} ;
280
+ let ( library_mode, library_resolve_paths) = if cfg. extract_dependencies_as_source {
281
+ ( SourceKind :: Source , resolve_paths)
282
+ } else {
283
+ ( SourceKind :: Library , ResolvePaths :: No )
284
+ } ;
280
285
let mut processed_files: HashSet < PathBuf , RandomState > =
281
286
HashSet :: from_iter ( files. iter ( ) . cloned ( ) ) ;
282
287
for ( manifest, files) in map. values ( ) . filter ( |( _, files) | !files. is_empty ( ) ) {
@@ -312,12 +317,13 @@ fn main() -> anyhow::Result<()> {
312
317
. source_root ( db)
313
318
. is_library
314
319
{
320
+ tracing:: info!( "file: {}" , file. display( ) ) ;
315
321
extractor. extract_with_semantics (
316
322
file,
317
323
& semantics,
318
324
vfs,
319
- ResolvePaths :: No ,
320
- SourceKind :: Library ,
325
+ library_resolve_paths ,
326
+ library_mode ,
321
327
) ;
322
328
extractor. archiver . archive ( file) ;
323
329
}
You can’t perform that action at this time.
0 commit comments