From 3cdf9e61518eb69316ffaceae3b4eacc927db277 Mon Sep 17 00:00:00 2001 From: Bryn Rhodes Date: Sat, 10 Jan 2026 11:21:08 -0700 Subject: [PATCH 1/3] Fixed exception loading cql options --- .../cql/ls/server/manager/CompilerOptionsManager.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 f8ba06c..a64b3ae 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 @@ -3,6 +3,7 @@ import static kotlinx.io.files.PathsKt.Path; import java.io.InputStream; +import java.net.MalformedURLException; import java.net.URI; import java.util.HashMap; import java.util.Map; @@ -41,16 +42,17 @@ protected void clearOptions(URI uri) { } protected CqlCompilerOptions readOptions(URI rootUri) { - CqlCompilerOptions options = null; 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/cql-options.json")).getCqlCompilerOptions(); + try { + options = CqlTranslatorOptions.fromFile(Path(optionsUri.toURL().getPath())).getCqlCompilerOptions(); + } catch (Exception e) { + log.info(String.format("Exception %s attempting to load options from %s, using default options", e.getMessage(), optionsUri.toString())); + } } else { log.info(String.format("%s not found, using default options", optionsUri.toString())); options = CqlTranslatorOptions.defaultOptions().getCqlCompilerOptions(); From b18217a4460cb658d321cad4374eaf753f65ac98 Mon Sep 17 00:00:00 2001 From: Bryn Rhodes Date: Sat, 10 Jan 2026 11:22:54 -0700 Subject: [PATCH 2/3] Update version to 4.1.2 --- core/pom.xml | 2 +- debug/server/pom.xml | 2 +- debug/service/pom.xml | 2 +- ls/server/pom.xml | 2 +- ls/service/pom.xml | 2 +- plugin/debug/pom.xml | 2 +- pom.xml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/pom.xml b/core/pom.xml index 464af40..92c0c7a 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -12,7 +12,7 @@ org.opencds.cqf.cql.ls cql-ls - 4.1.1 + 4.1.2 ../pom.xml diff --git a/debug/server/pom.xml b/debug/server/pom.xml index ddcee19..a36a533 100644 --- a/debug/server/pom.xml +++ b/debug/server/pom.xml @@ -12,7 +12,7 @@ org.opencds.cqf.cql.ls cql-ls - 4.1.1 + 4.1.2 ../../pom.xml diff --git a/debug/service/pom.xml b/debug/service/pom.xml index d3da9d8..cfdfe57 100644 --- a/debug/service/pom.xml +++ b/debug/service/pom.xml @@ -12,7 +12,7 @@ org.opencds.cqf.cql.ls cql-ls - 4.1.1 + 4.1.2 ../../pom.xml diff --git a/ls/server/pom.xml b/ls/server/pom.xml index 2fb0334..63d4c58 100644 --- a/ls/server/pom.xml +++ b/ls/server/pom.xml @@ -12,7 +12,7 @@ org.opencds.cqf.cql.ls cql-ls - 4.1.1 + 4.1.2 ../../pom.xml diff --git a/ls/service/pom.xml b/ls/service/pom.xml index 92c4a6b..6b5134e 100644 --- a/ls/service/pom.xml +++ b/ls/service/pom.xml @@ -11,7 +11,7 @@ org.opencds.cqf.cql.ls cql-ls - 4.1.1 + 4.1.2 ../../pom.xml diff --git a/plugin/debug/pom.xml b/plugin/debug/pom.xml index e14da7f..fe54770 100644 --- a/plugin/debug/pom.xml +++ b/plugin/debug/pom.xml @@ -11,7 +11,7 @@ org.opencds.cqf.cql.ls cql-ls - 4.1.1 + 4.1.2 ../../pom.xml diff --git a/pom.xml b/pom.xml index c3c9789..28318d8 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.opencds.cqf.cql.ls cql-ls pom - 4.1.1 + 4.1.2 CQL Language Server A Language Server for CQL implementing the LSP From 7d23c8073f1b6c8ff3e6c17b2d4dd27eed8456f4 Mon Sep 17 00:00:00 2001 From: Bryn Rhodes Date: Sat, 10 Jan 2026 11:23:16 -0700 Subject: [PATCH 3/3] Spotless --- .../cqf/cql/ls/server/manager/CompilerOptionsManager.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 a64b3ae..ef552fc 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 @@ -3,7 +3,6 @@ import static kotlinx.io.files.PathsKt.Path; import java.io.InputStream; -import java.net.MalformedURLException; import java.net.URI; import java.util.HashMap; import java.util.Map; @@ -49,9 +48,12 @@ protected CqlCompilerOptions readOptions(URI rootUri) { if (input != null) { try { - options = CqlTranslatorOptions.fromFile(Path(optionsUri.toURL().getPath())).getCqlCompilerOptions(); + options = CqlTranslatorOptions.fromFile(Path(optionsUri.toURL().getPath())) + .getCqlCompilerOptions(); } catch (Exception e) { - log.info(String.format("Exception %s attempting to load options from %s, using default options", e.getMessage(), optionsUri.toString())); + log.info(String.format( + "Exception %s attempting to load options from %s, using default options", + e.getMessage(), optionsUri.toString())); } } else { log.info(String.format("%s not found, using default options", optionsUri.toString()));