Skip to content

Commit 5e032cf

Browse files
committed
Add community modules to the paths supplied by TLC.
Signed-off-by: Karolis Petrauskas <[email protected]>
1 parent 16ebbce commit 5e032cf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/tla2tools.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@ const NO_ERROR = 0;
2525
const MIN_TLA_ERROR = 10; // Exit codes not related to tooling start from this number
2626
const LOWEST_JAVA_VERSION = 8;
2727
const DEFAULT_GC_OPTION = '-XX:+UseParallelGC';
28+
const TLA_CMODS_LIB_NAME = 'CommunityModules-deps.jar';
2829
const TLA_TOOLS_LIB_NAME = 'tla2tools.jar';
2930
const TLA_TOOLS_LIB_NAME_END_UNIX = '/' + TLA_TOOLS_LIB_NAME;
3031
const TLA_TOOLS_LIB_NAME_END_WIN = '\\' + TLA_TOOLS_LIB_NAME;
3132
const toolsJarPath = path.resolve(__dirname, '../tools/' + TLA_TOOLS_LIB_NAME);
33+
const cmodsJarPath = path.resolve(__dirname, '../tools/' + TLA_CMODS_LIB_NAME);
3234
const javaCmd = 'java' + (process.platform === 'win32' ? '.exe' : '');
3335
const javaVersionChannel = new ToolOutputChannel('TLA+ Java version');
3436
const TLA_TOOLS_STANDARD_MODULES = '/tla2sany/StandardModules';
@@ -158,7 +160,8 @@ async function runTool(
158160

159161
export function moduleSearchPaths(): string[] {
160162
return [
161-
'jar:file:' + toolsJarPath + '!' + TLA_TOOLS_STANDARD_MODULES
163+
'jar:file:' + toolsJarPath + '!' + TLA_TOOLS_STANDARD_MODULES,
164+
'jar:file:' + cmodsJarPath + '!' + '/'
162165
];
163166
}
164167

0 commit comments

Comments
 (0)