@@ -19,12 +19,20 @@ const DEBUG = (typeof v8debug === 'object') || startedInDebugMode();
19
19
/**
20
20
* Argument that tells the program where to generate the heap dump that is created when an OutOfMemoryError is raised and `HEAP_DUMP` has been passed
21
21
*/
22
- export const HEAP_DUMP_LOCATION = '-XX:HeapDumpPath=' ;
22
+ export const HEAP_DUMP_LOCATION = '-XX:HeapDumpPath=' ;
23
23
24
- /**
25
- * Argument that tells the program to generate a heap dump file when an OutOfMemoryError is raised
26
- */
27
- export const HEAP_DUMP = '-XX:+HeapDumpOnOutOfMemoryError' ;
24
+ /**
25
+ * Argument that tells the program to generate a heap dump file when an OutOfMemoryError is raised
26
+ */
27
+ export const HEAP_DUMP = '-XX:+HeapDumpOnOutOfMemoryError' ;
28
+
29
+ /**
30
+ * Argument that specifies name of the dependency collector implementation to use.
31
+ * `df` for depth-first and `bf` for breadth-first.
32
+ * See: https://github.com/apache/maven-resolver/blob/maven-resolver-1.9.7/src/site/markdown/configuration.md
33
+ */
34
+ const DEPENDENCY_COLLECTOR_IMPL = '-Daether.dependencyCollector.impl=' ;
35
+ const DEPENDENCY_COLLECTOR_IMPL_BF = 'bf' ;
28
36
29
37
export function prepareExecutable ( requirements : RequirementsData , workspacePath , javaConfig , context : ExtensionContext , isSyntaxServer : boolean ) : Executable {
30
38
const executable : Executable = Object . create ( null ) ;
@@ -130,6 +138,9 @@ function prepareParams(requirements: RequirementsData, javaConfiguration, worksp
130
138
if ( vmargs . indexOf ( HEAP_DUMP_LOCATION ) < 0 ) {
131
139
params . push ( `${ HEAP_DUMP_LOCATION } ${ path . dirname ( workspacePath ) } ` ) ;
132
140
}
141
+ if ( vmargs . indexOf ( DEPENDENCY_COLLECTOR_IMPL ) < 0 ) {
142
+ params . push ( `${ DEPENDENCY_COLLECTOR_IMPL } ${ DEPENDENCY_COLLECTOR_IMPL_BF } ` ) ;
143
+ }
133
144
134
145
const sharedIndexLocation : string = resolveIndexCache ( context ) ;
135
146
if ( sharedIndexLocation ) {
0 commit comments