Skip to content

Commit 47dfb34

Browse files
committed
Remove std:// from Rascal-LSP path config.
1 parent 5efa78c commit 47dfb34

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

‎src/org/rascalmpl/library/util/PathConfig.java‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -493,28 +493,30 @@ private static void buildRascalSelfApplicationConfig(ISourceLocation workspaceRa
493493
* Configure paths for the rascal-lsp project when it's open in the IDE (the runtime inside rascal-lsp is not configured here)
494494
*/
495495
private static void buildRascalLSPConfig(ISourceLocation manifestRoot, RascalConfigMode mode, List<Artifact> mavenClasspath, IListWriter srcs, IListWriter libs, IListWriter messages) throws IOException {
496-
var insideRascalJar = JarURIResolver.jarify(resolveCurrentRascalRuntimeJar());
496+
var currentRascalRuntimeJar = resolveCurrentRascalRuntimeJar();
497+
var insideRascalJar = JarURIResolver.jarify(currentRascalRuntimeJar);
498+
var rascalLibrary = URIUtil.getChildLocation(insideRascalJar, "org/rascalmpl/library");
497499
var rascalCompiler = URIUtil.getChildLocation(insideRascalJar, "org/rascalmpl/compiler");
498500
var typepal = URIUtil.getChildLocation(insideRascalJar, "org/rascalmpl/typepal");
499501

500502
if (mode == RascalConfigMode.INTERPRETER) {
501-
// we're building a repl for the rascal-lsp project
503+
// we're building a REPL for the rascal-lsp project
502504
// so this is a rascal-lsp developer working on code in rascal-lsp
503505
// most stuff flows from the
504-
srcs.append(URIUtil.rootLocation("std"));
506+
srcs.append(rascalLibrary);
505507
srcs.append(rascalCompiler);
506508
srcs.append(typepal);
507509
}
508510
else {
509-
libs.append(JarURIResolver.jarify(resolveCurrentRascalRuntimeJar()));
511+
libs.append(insideRascalJar);
510512
// while it's tempting to see if the rascal project is there, and we might be able to get the rascal compiler tpls from the target folder.
511513
// as long as we're hard wiring the rascal compler to follow the runtime
512514
// we have to let the type-checker for rascal-lsp re-type-check rascal compiler
513515
// this allows developers in rascal-lsp to get typechecking for parts even if they import rascal compiler/typepal modules
514516
srcs.append(rascalCompiler);
515517
srcs.append(typepal);
516518
}
517-
libs.append(resolveCurrentRascalRuntimeJar()); // add our own jar to the lib path to make sure rascal classes are found
519+
libs.append(currentRascalRuntimeJar); // add our own jar to the lib path to make sure rascal classes are found
518520

519521
translateSources(manifestRoot, srcs, messages);
520522

0 commit comments

Comments
 (0)