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:
8282 title : Skip path resolution
8383 description : >
8484 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 {
6767 pub extra_includes : Vec < PathBuf > ,
6868 pub proc_macro_server : Option < PathBuf > ,
6969 pub skip_path_resolution : bool ,
70+ pub extract_dependencies_as_source : bool ,
7071}
7172
7273impl Config {
Original file line number Diff line number Diff line change @@ -277,6 +277,11 @@ fn main() -> anyhow::Result<()> {
277277 } else {
278278 ResolvePaths :: Yes
279279 } ;
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+ } ;
280285 let mut processed_files: HashSet < PathBuf , RandomState > =
281286 HashSet :: from_iter ( files. iter ( ) . cloned ( ) ) ;
282287 for ( manifest, files) in map. values ( ) . filter ( |( _, files) | !files. is_empty ( ) ) {
@@ -312,12 +317,13 @@ fn main() -> anyhow::Result<()> {
312317 . source_root ( db)
313318 . is_library
314319 {
320+ tracing:: info!( "file: {}" , file. display( ) ) ;
315321 extractor. extract_with_semantics (
316322 file,
317323 & semantics,
318324 vfs,
319- ResolvePaths :: No ,
320- SourceKind :: Library ,
325+ library_resolve_paths ,
326+ library_mode ,
321327 ) ;
322328 extractor. archiver . archive ( file) ;
323329 }
You can’t perform that action at this time.
0 commit comments