Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAT-6463: Reverting to CqFramework 3.3.2 because 0.0.2-SNAPSHOT got '… #6

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
<maven.compiler.target>17</maven.compiler.target>
<mockito.version>5.12.0</mockito.version>
<slf4j.version>2.0.13</slf4j.version>
<cqframework.version>3.14.0</cqframework.version>
<cqframework.version>3.3.2</cqframework.version>
<spotify.fmt.version>2.21.1</spotify.fmt.version>
<lombok.version>1.18.24</lombok.version>
<madie.rest.commons.version>0.0.7-SNAPSHOT</madie.rest.commons.version>
<madie.rest.commons.version>0.0.4-SNAPSHOT</madie.rest.commons.version>
<hamcrest.version>3.0-rc1</hamcrest.version>
<jaxb.api.version>2.3.1</jaxb.api.version>
<spring.test.version>6.1.11</spring.test.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
import org.cqframework.cql.cql2elm.CqlTranslator;
import org.cqframework.cql.cql2elm.LibraryBuilder;
import org.cqframework.cql.cql2elm.model.CompiledLibrary;
import org.cqframework.cql.cql2elm.preprocessor.CqlPreprocessorElmCommonVisitor;
import org.cqframework.cql.elm.IdObjectFactory;
import org.cqframework.cql.cql2elm.preprocessor.CqlPreprocessorVisitor;

import org.cqframework.cql.gen.cqlLexer;
import org.cqframework.cql.gen.cqlParser;
import org.hl7.elm.r1.ExpressionDef;
Expand Down Expand Up @@ -135,10 +135,9 @@ public void generate() throws IOException {
|| usingProperties.getLibraryType()
== "QICore"); // <-- BADDDDD!!!! Defaults to fhir

CqlPreprocessorElmCommonVisitor preprocessor =
new CqlPreprocessorElmCommonVisitor(
new LibraryBuilder(translationResource.getLibraryManager(), new IdObjectFactory()),
tokens);
CqlPreprocessorVisitor preprocessor =
new CqlPreprocessorVisitor(
new LibraryBuilder(translationResource.getLibraryManager()), tokens);

preprocessor.visit(tree);
ParseTreeWalker walker = new ParseTreeWalker();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@
import org.antlr.v4.runtime.tree.ParseTree;
import org.antlr.v4.runtime.tree.ParseTreeWalker;
import org.apache.commons.collections4.CollectionUtils;
import org.cqframework.cql.cql2elm.CqlCompilerOptions;
import org.cqframework.cql.cql2elm.LibraryBuilder;
import org.cqframework.cql.cql2elm.model.CompiledLibrary;
import org.cqframework.cql.cql2elm.preprocessor.CqlPreprocessorElmCommonVisitor;

import org.cqframework.cql.elm.IdObjectFactory;
import org.cqframework.cql.cql2elm.preprocessor.CqlPreprocessorVisitor;
import org.cqframework.cql.gen.cqlBaseListener;
import org.cqframework.cql.gen.cqlLexer;
import org.cqframework.cql.gen.cqlParser;
Expand Down Expand Up @@ -690,10 +689,14 @@ private void parseChildLibraries(IncludeDef def) throws IOException {
TranslationResource translationResource =
TranslationResource.getInstance(true); // <-- BADDDDD!!!! Defaults to fhir

CqlPreprocessorElmCommonVisitor preprocessor =
new CqlPreprocessorElmCommonVisitor(
new LibraryBuilder(translationResource.getLibraryManager(), new IdObjectFactory()),
tokens);
// Add CqlCompilerOptions from LibraryManager to prevent NPE while walking through CQL
LibraryBuilder libraryBuilder = new LibraryBuilder(translationResource.getLibraryManager());
// MAT-7300: change signature level to overloads
CqlCompilerOptions options = translationResource.getLibraryManager().getCqlCompilerOptions();
options.setSignatureLevel(LibraryBuilder.SignatureLevel.Overloads);
libraryBuilder.setCompilerOptions(options);
CqlPreprocessorVisitor preprocessor = new CqlPreprocessorVisitor(libraryBuilder, tokens);

preprocessor.visit(tree);
ParseTreeWalker walker = new ParseTreeWalker();
walker.walk(listener, tree);
Expand Down
Loading