Fix CqlInternalException to CqlToElmError mapping#1608
Conversation
JPercival
commented
Sep 26, 2025
- Fixed a case where incorrect CqlToElmError annotations were generated for CqlIncludeExceptions
- Test for same
- Migrated the test code I touched to Kotlin
|
Formatting check succeeded! |
There was a problem hiding this comment.
Pull Request Overview
This PR fixes CqlInternalException to CqlToElmError mapping by correcting how CqlIncludeException annotations are generated. The main change improves error handling for missing included libraries by ensuring the correct error type and properties are set in the CqlToElmError annotations.
- Fixed mapping of CqlIncludeException to CqlToElmError annotations with proper ErrorType.INCLUDE
- Added test for missing included libraries that verifies correct error annotation generation
- Migrated test code from Java to Kotlin
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| LibraryBuilder.kt | Fixed error type mapping logic for CqlIncludeException and improved code structure |
| ElmDeserializeTests.kt | Added test for missing include error handling and migrated from Java to Kotlin |
| TestUtils.kt | Migrated utility functions from Java to Kotlin |
| TestLibrarySourceProvider.kt | Migrated library source provider from Java to Kotlin |
| IdObjectFactoryTest.kt | Migrated test from Java to Kotlin |
| MissingIncludedLibraryTest.cql | Added test CQL file for missing library scenario |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Src/java/cql-to-elm/src/commonMain/kotlin/org/cqframework/cql/cql2elm/LibraryBuilder.kt
Show resolved
Hide resolved
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1608 +/- ##
=========================================
Coverage 62.88% 62.88%
Complexity 1863 1863
=========================================
Files 341 341
Lines 14925 14925
Branches 2966 2966
=========================================
Hits 9385 9385
Misses 4060 4060
Partials 1480 1480 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Convert the rest of the ELM module tests to Kotlin
|

