Skip to content

Commit 2befb85

Browse files
Eskibearfbricon
authored andcommitted
use breadth-first dependency collector impl
Signed-off-by: Yan Zhang <[email protected]>
1 parent 3f09964 commit 2befb85

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

src/javaServerStarter.ts

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,20 @@ const DEBUG = (typeof v8debug === 'object') || startedInDebugMode();
1919
/**
2020
* 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
2121
*/
22-
export const HEAP_DUMP_LOCATION = '-XX:HeapDumpPath=';
22+
export const HEAP_DUMP_LOCATION = '-XX:HeapDumpPath=';
2323

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';
2836

2937
export function prepareExecutable(requirements: RequirementsData, workspacePath, javaConfig, context: ExtensionContext, isSyntaxServer: boolean): Executable {
3038
const executable: Executable = Object.create(null);
@@ -130,6 +138,9 @@ function prepareParams(requirements: RequirementsData, javaConfiguration, worksp
130138
if (vmargs.indexOf(HEAP_DUMP_LOCATION) < 0) {
131139
params.push(`${HEAP_DUMP_LOCATION}${path.dirname(workspacePath)}`);
132140
}
141+
if (vmargs.indexOf(DEPENDENCY_COLLECTOR_IMPL) < 0) {
142+
params.push(`${DEPENDENCY_COLLECTOR_IMPL}${DEPENDENCY_COLLECTOR_IMPL_BF}`);
143+
}
133144

134145
const sharedIndexLocation: string = resolveIndexCache(context);
135146
if (sharedIndexLocation) {

0 commit comments

Comments
 (0)