diff --git a/core/pom.xml b/core/pom.xml index 50e40b3..464af40 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -12,7 +12,7 @@ org.opencds.cqf.cql.ls cql-ls - 4.1.0-SNAPSHOT + 4.1.1 ../pom.xml diff --git a/debug/server/pom.xml b/debug/server/pom.xml index ec4415d..ddcee19 100644 --- a/debug/server/pom.xml +++ b/debug/server/pom.xml @@ -12,7 +12,7 @@ org.opencds.cqf.cql.ls cql-ls - 4.1.0-SNAPSHOT + 4.1.1 ../../pom.xml diff --git a/debug/service/pom.xml b/debug/service/pom.xml index ab40e83..d3da9d8 100644 --- a/debug/service/pom.xml +++ b/debug/service/pom.xml @@ -12,7 +12,7 @@ org.opencds.cqf.cql.ls cql-ls - 4.1.0-SNAPSHOT + 4.1.1 ../../pom.xml diff --git a/ls/server/pom.xml b/ls/server/pom.xml index 317ebb6..2fb0334 100644 --- a/ls/server/pom.xml +++ b/ls/server/pom.xml @@ -12,7 +12,7 @@ org.opencds.cqf.cql.ls cql-ls - 4.1.0-SNAPSHOT + 4.1.1 ../../pom.xml diff --git a/ls/server/src/main/java/org/opencds/cqf/cql/ls/server/manager/CompilerOptionsManager.java b/ls/server/src/main/java/org/opencds/cqf/cql/ls/server/manager/CompilerOptionsManager.java index 6375820..f8ba06c 100644 --- a/ls/server/src/main/java/org/opencds/cqf/cql/ls/server/manager/CompilerOptionsManager.java +++ b/ls/server/src/main/java/org/opencds/cqf/cql/ls/server/manager/CompilerOptionsManager.java @@ -44,12 +44,13 @@ protected CqlCompilerOptions readOptions(URI rootUri) { CqlCompilerOptions options = null; - var optionsUri = Uris.addPath(rootUri, "/cql-options.json"); + var optionsUri = Uris.addPath(rootUri, "/cql/cql-options.json"); InputStream input = contentService.read(optionsUri); if (input != null) { // TODO: Why is this using fromFile and not fromSource? - options = CqlTranslatorOptions.fromFile(Path("/cql-options.json")).getCqlCompilerOptions(); + options = + CqlTranslatorOptions.fromFile(Path("/cql/cql-options.json")).getCqlCompilerOptions(); } else { log.info(String.format("%s not found, using default options", optionsUri.toString())); options = CqlTranslatorOptions.defaultOptions().getCqlCompilerOptions(); diff --git a/ls/server/src/main/java/org/opencds/cqf/cql/ls/server/service/DiagnosticsService.java b/ls/server/src/main/java/org/opencds/cqf/cql/ls/server/service/DiagnosticsService.java index c7b2253..09088b4 100644 --- a/ls/server/src/main/java/org/opencds/cqf/cql/ls/server/service/DiagnosticsService.java +++ b/ls/server/src/main/java/org/opencds/cqf/cql/ls/server/service/DiagnosticsService.java @@ -129,10 +129,18 @@ public Map> lint(URI uri) { .collect(Collectors.toList()); URI root = Uris.getHead(uri); - List> libraryUriList = uniqueLibraries.stream() - .map(x -> Pair.of( - x, this.contentService.locate(root, x).iterator().next())) - .collect(Collectors.toList()); + var libraryUriList = new ArrayList>(); + for (var libraryIdentifier : uniqueLibraries) { + var uris = this.contentService.locate(root, libraryIdentifier); + if (uris != null && !uris.isEmpty()) { + libraryUriList.add(Pair.of(libraryIdentifier, uris.iterator().next())); + } else { + // The message is associated with a library loaded from outside the content service (e.g. an npm + // library) + // So associate the message with the current uri + libraryUriList.add(Pair.of(libraryIdentifier, uri)); + } + } Map libraryUris = new HashMap<>(); for (Pair p : libraryUriList) { diff --git a/ls/service/pom.xml b/ls/service/pom.xml index 3dfde39..92c4a6b 100644 --- a/ls/service/pom.xml +++ b/ls/service/pom.xml @@ -11,7 +11,7 @@ org.opencds.cqf.cql.ls cql-ls - 4.1.0-SNAPSHOT + 4.1.1 ../../pom.xml diff --git a/plugin/debug/pom.xml b/plugin/debug/pom.xml index 823043a..e14da7f 100644 --- a/plugin/debug/pom.xml +++ b/plugin/debug/pom.xml @@ -11,7 +11,7 @@ org.opencds.cqf.cql.ls cql-ls - 4.1.0-SNAPSHOT + 4.1.1 ../../pom.xml diff --git a/pom.xml b/pom.xml index 57ce7cf..c3c9789 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.opencds.cqf.cql.ls cql-ls pom - 4.1.0-SNAPSHOT + 4.1.1 CQL Language Server A Language Server for CQL implementing the LSP