Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
The cql-to-elm translator was updated recently to version 3.7.1. The major change in this version is that there are now localIds on every statement in the ELM. While this is a good change, it requires us to do some updating in our clause coverage calculation due to workarounds and handling of specific cases that were present in previous translator versions that are now changed.
New behavior
Specifically, this PR adds handling in the
findAllLocalIdsInStatement
function for any TypeSpecifiers and aliases. Hoss detailed in comments in the code what exactly is being changed.Code changes
src/helpers/ClauseResultsHelpers.ts
- handling infindAllLocalIdsInStatement
that reflects changes made in the translatorTesting guidance
npm run check
--debug
flag and inspect the clause coverage output. The percentage BEFORE the translator changes on the master branch of fqm-execution should be 99.7%, the percentage AFTER the translator changes on the master branch of fqm-execution should be 57.9% and the percentage AFTER the translator changes on this branch should be 99.5%. Note that it is not back to the previous coverage because there are still issues that we are investigating.cql-translation-service
(Support for Translator 3.7.1 cqframework/cql-translation-service#40), I was able to run the translation service on his branch and retranslate some of the CQL in the unit tests (test/unit/elm/queries
) and reran the unit tests with no issues. I also did this for the integration tests.cql-translation-service
branch and ecqm-bundler, I was able to retranslate CMS165 using the newest translator version. This branch was able to get coverage back to the same as it was pre translator update.