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

[WIP] CQL JS Compiler #1462

Draft
wants to merge 93 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
bd76188
WIP
JPercival Aug 1, 2024
97d8b38
WIP
JPercival Aug 2, 2024
380ce8a
WIP
JPercival Aug 2, 2024
d6b8c82
Working?
JPercival Aug 2, 2024
5f6df9a
Fix usage of Java 17 API
JPercival Sep 13, 2024
7f8814f
Update checkstyle rules
JPercival Sep 13, 2024
d0538b0
Fix static analysis
JPercival Sep 13, 2024
64faae3
Updates to src dirs
JPercival Sep 15, 2024
d3dd7fb
Fixing up missing test sourceSet
JPercival Sep 15, 2024
1e7806d
Try another way to specify the antlr directory
JPercival Sep 15, 2024
a35bb71
Third different way
JPercival Sep 15, 2024
e7a0edd
Add some logging
JPercival Sep 15, 2024
78070d4
merge master
JPercival Sep 16, 2024
76360e2
Change toolchain resolution
JPercival Sep 17, 2024
b66739a
Fix tests
JPercival Sep 17, 2024
92631bc
More tweaks to animalsniffer
JPercival Sep 17, 2024
f4749f2
Fix formatting
JPercival Sep 17, 2024
3a2b2cb
Trying random stuff
JPercival Sep 17, 2024
5a4035c
More random stuff
JPercival Sep 17, 2024
a37cb75
Add Kotlin static analysis and formatting
JPercival Sep 17, 2024
c78d3c5
More KT cleanup
JPercival Sep 18, 2024
a428f4c
WIP
JPercival Sep 20, 2024
1cf7a68
Fix formatting
JPercival Sep 20, 2024
59c02a6
WIP, multi-platform
JPercival Sep 20, 2024
31a19dc
Build preliminary CQL parsing library targeting JS (#1434)
antvaset Nov 4, 2024
6af4b68
Swap Gradle language from Groovy to Kotlin (#1413)
JPercival Nov 6, 2024
fc0b9ec
Origin/feature kotlin conventions patch (#1437)
JPercival Nov 6, 2024
ac1be93
Merge branch 'master' into feature-kotlin-conventions
JPercival Nov 6, 2024
170c33c
Fix static app entry point, fix build dependencies
JPercival Nov 7, 2024
8dd237d
Play within memory options
JPercival Nov 7, 2024
0f3af36
Merge branch 'feature-kotlin-conventions' into feature-multiplatform-…
antvaset Nov 13, 2024
78580bd
Add demo UI for CQL parser (#1439)
antvaset Nov 15, 2024
935ef51
Update to Java 17, sync Android signature settings with FHIR SDK (#1442)
JPercival Nov 15, 2024
cc340a3
Kotlin Conventions Plugin (#1438)
JPercival Nov 18, 2024
595f9a7
merge remote-tracking branch 'origin/master' into feature-multiplatfo…
JPercival Nov 18, 2024
67d69e3
Remove leading spaces from codeql.yml (#1446)
antvaset Nov 19, 2024
0a7f8f0
Remove redundant overrides in `Cql2ElmVisitor` and `CqlPreprocessor` …
antvaset Nov 19, 2024
6557f0e
Merge branch 'master' into feature-multiplatform-cql-parser
JPercival Nov 19, 2024
8a3394b
Add toolchain resolver plugins
JPercival Nov 19, 2024
f735347
Update Gradle to 8.11
JPercival Nov 19, 2024
24237cb
Refactor and Genericize Invocation hierarchy (#1444)
JPercival Nov 20, 2024
e47aa29
Merge branch 'master' into feature-multiplatform-cql-parser
JPercival Nov 21, 2024
99b59c4
sync versions, merge master, remove unused code
JPercival Nov 21, 2024
3ef9807
Fix typo
JPercival Nov 21, 2024
afc6c02
Fix build deprecation warnings
JPercival Nov 21, 2024
916ecb3
Don't need the xjc conventions for cql-to-elm, that's upstream
JPercival Nov 21, 2024
40d6e50
Update README.md with Java requirements
JPercival Nov 21, 2024
4226a65
Merge branch 'master' into feature-multiplatform-cql-parser
JPercival Nov 21, 2024
0f50f18
Convert Invocation hierarchy to Kotlin (#1449)
JPercival Nov 22, 2024
faf20f1
Fixes for non-deterministic behavior (#1452)
JPercival Nov 26, 2024
b80b613
Convert cql-to-elm preprocessor Java code to Kotlin (#1450)
antvaset Nov 26, 2024
e9b4887
Partial conversion of the `model` package to Kotlin (#1455)
JPercival Nov 27, 2024
45b5bc5
Convert remaining cql-to-elm classes to Kotlin
antvaset Dec 1, 2024
c77d9ae
Rename .java to .kt
antvaset Dec 2, 2024
79fd491
Convert Cql2ElmVisitor to Kotlin (WIP)
antvaset Dec 2, 2024
85d3453
Conversion of Model hierarchy to Kotlin (#1457)
JPercival Dec 2, 2024
38146d5
Update and merge fix
antvaset Dec 4, 2024
f1268e1
Fix build errors
antvaset Dec 4, 2024
cfcaf7e
erge branch 'master' into feature-kotlin
JPercival Dec 4, 2024
7613237
merge branch 'feature-kotlin' into convert-rest-of-cql-to-elm-main-to…
JPercival Dec 4, 2024
def7af8
Merge branch 'feature-kotlin' into feature-multiplatform-cql-parser
JPercival Dec 4, 2024
61ea9a5
Fix formatting
JPercival Dec 4, 2024
14102fe
Merge branch 'feature-multiplatform-cql-parser' into feature-kotlin
JPercival Dec 4, 2024
f30c08a
Rev to 2.0.20 Kotlin
JPercival Dec 4, 2024
d2b4196
Merge branch 'master' into feature-kotlin
antvaset Dec 6, 2024
31160ea
Convert the `model` module to Kotlin (#1465)
JPercival Dec 11, 2024
89c4d17
Conversion of the `elm` module to Kotin (#1466)
JPercival Dec 12, 2024
650c1ab
Clean-up of TupleType (#1467)
JPercival Dec 12, 2024
214a32c
merge remote-tracking branch 'origin/master' into feature-kotlin
JPercival Dec 12, 2024
3c647c2
Fix compile error
JPercival Dec 12, 2024
a021ffa
Remove stray gradle build file
JPercival Dec 12, 2024
7d902ee
Rewrite String escaping (#1468)
JPercival Dec 13, 2024
b4dd0fa
simplify map check
JPercival Dec 13, 2024
82823a8
Break out UCUM Service into its own module (#1471)
JPercival Dec 16, 2024
44f4bdf
Implement `Trackable` as an extension property (#1472)
JPercival Dec 16, 2024
26c56e0
Breakout CqlTranslatorOptionsMapper into its own project. (#1473)
JPercival Dec 16, 2024
52d070c
Merge remote-tracking branch 'origin/master' into feature-kotlin
JPercival Dec 16, 2024
3d47333
Move clasess to Kotlin folder
JPercival Dec 16, 2024
410b4e5
Fewer hashmaps and reduced memory usage for Trackable extension prope…
JPercival Dec 20, 2024
6eb6485
Merge branch 'master' into feature-kotlin
JPercival Dec 20, 2024
51e373c
Merge remote-tracking branch 'origin/master' into feature-kotlin
JPercival Dec 22, 2024
3a333d4
Tons of cleanup of warnings
JPercival Dec 23, 2024
2cb2379
More cleanup of warnings
JPercival Dec 23, 2024
4f7ceca
Cleaning up more warnings
JPercival Dec 24, 2024
b38b797
Hundreds more warnings gone
JPercival Dec 24, 2024
1627ddf
Remove usage of String.format
JPercival Dec 24, 2024
3b912cd
Move some serialization-based tests out of cql-to-elm and into elm-jaxb
JPercival Dec 26, 2024
236d5cc
Replace xjc with custom XSD Kotlin code gen (#1479)
antvaset Dec 29, 2024
dd5099d
Convert model module to be multiplatform
JPercival Dec 30, 2024
9637574
Fix model multiplatform
JPercival Dec 31, 2024
9508a81
Minor cleanup
JPercival Dec 31, 2024
70285b2
Update notes on tests failures
JPercival Jan 1, 2025
b5a62e8
Update .gitignore
JPercival Jan 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
47 changes: 47 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: "CodeQL Advanced"

on:
push:
branches: [ "master" ]
paths:
- "Src/java/**"
pull_request:
branches: [ "master" ]
paths:
- "Src/java/**"
schedule:
- cron: '36 15 * * 1'

jobs:
CodeQLBuild:
runs-on: 'ubuntu-latest'
permissions:
security-events: write
packages: read
actions: read
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
cache: 'gradle'

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: java-kotlin
source-root: Src/java
- name: Autobuild CodeQL
uses: github/codeql-action/autobuild@v3
with:
working-directory: Src/java

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:java-kotlin"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ node_modules
.nyc_output
coverage
gen
.kotlin

12 changes: 0 additions & 12 deletions Src/java-quickstart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,6 @@ To clean up the artifacts:

./gradlew clean

# Generating IDE Projects

You can generate an IDE project for IntelliJ IDEA:

./gradlew idea

This is preferred over having IDEA load the gradle file directly, because it (a) generates the CQL
libraries, and (b) generates the configuration for the IDEA ANTLR plugin. To open the project in
IntelliJ IDEA, launch IDEA and open the `java-quickstart.ipr` file.

See further below for installing and using the ANTLR plugin for IDEA.

# Executing the Sample Code

You can execute the sample code using the `gradlew` command or a script generated by gradle.
Expand Down
11 changes: 1 addition & 10 deletions Src/java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ It contains the following sub-projects:
# Building the Project

This project uses the [Gradle](http://www.gradle.org/) build system. A gradle wrapper, which automatically downloads
and uses an instance of gradle, is provided for convenience. To build the project, install the [JDK 11](https://adoptium.net/temurin/releases/?version=11), clone this
and uses an instance of gradle, is provided for convenience. To build the project, install the [JDK 17](https://adoptium.net/temurin/releases/?version=17), clone this
repository, then execute this command from within this directory:

./gradlew build
Expand All @@ -31,15 +31,6 @@ To clean up the build artifacts:

./gradlew clean

# Generating IDE Projects

You can generate an IDE project for IntelliJ IDEa:

./gradlew idea

In addition to creating project modules for cql, model, quick, elm, cql-to-elm, and the tools projects, this will also import project
modules for the CQL grammar and examples.

# Executing the Sample Code

You can execute the sample code using the `gradlew` command or a script generated by gradle.
Expand Down
55 changes: 0 additions & 55 deletions Src/java/build.gradle

This file was deleted.

16 changes: 16 additions & 0 deletions Src/java/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
plugins {
kotlin("jvm")
id("org.sonarqube") version "4.4.1.3373"
}

sonar {
properties {
property("sonar.projectKey", "cqframework_clinical_quality_language")
property("sonar.organization", "cqframework")
property("sonar.host.url", "https://sonarcloud.io")
}
}

repositories {
mavenCentral()
}
15 changes: 0 additions & 15 deletions Src/java/buildSrc/build.gradle

This file was deleted.

30 changes: 30 additions & 0 deletions Src/java/buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
plugins {
`kotlin-dsl`
}

repositories {
mavenCentral()
gradlePluginPortal()
}

dependencies {
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.20")
implementation("org.jetbrains.dokka:dokka-gradle-plugin:1.9.20")
implementation("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.23.3")
implementation("net.ltgt.gradle:gradle-errorprone-plugin:3.1.0")
implementation("ru.vyarus:gradle-animalsniffer-plugin:1.7.2")
implementation("com.github.spotbugs.snom:spotbugs-gradle-plugin:5.0.14")
implementation("com.diffplug.spotless:spotless-plugin-gradle:6.25.0")
implementation("com.github.node-gradle:gradle-node-plugin:7.1.0")
implementation("org.jetbrains.kotlin:kotlin-serialization:2.0.20")
}

kotlin {
jvmToolchain(17)
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
3 changes: 3 additions & 0 deletions Src/java/buildSrc/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
plugins {
id("org.gradle.toolchains.foojay-resolver-convention")
}
31 changes: 0 additions & 31 deletions Src/java/buildSrc/src/main/groovy/cql.fhir-conventions.gradle

This file was deleted.

Loading
Loading