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

Add option to test using local CF build #5

Merged
merged 7 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
9 changes: 9 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@ dependencies {
testImplementation libs.checkerframework.qual
}

// To use a locally-built Checker Framework, run gradle with "-PcfLocal".
if (hasProperty('cfLocal')) {
def cfHome = String.valueOf(System.getenv('CHECKERFRAMEWORK'))
dependencies {
testImplementation files(cfHome + '/checker/dist/checker.jar')
testImplementation files(cfHome + '/framework-test/build/libs/framework-test-3.42.0-eisop3-SNAPSHOT.jar')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to do this without hard-coding the version? It would be rather annoying to have to update this string for local testing.
If there is no simple way here, let's make a eisop PR that also creates a /checker/dist/framework-test.jar file.

Copy link
Collaborator Author

@rohan-shettyy rohan-shettyy Apr 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found that the dependency on this framework-test jar doesn't do anything in the local case, but the dependency on framework-test in general is required to recognize all symbols.

}
}

spotless {
format 'misc', {
// define the files to apply `misc` to
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jspecify-conformance-tests = { module = "org.jspecify.conformance:conformance-te
jspecify-conformance-framework = { module = "org.jspecify.conformance:conformance-test-framework", version.ref = "jSpecifyConformanceTestVer" }
checkerframework-checker = { module = "io.github.eisop:checker", version.ref = "checkerFrameworkVer" }
checkerframework-framework-test = { module = "io.github.eisop:framework-test", version.ref = "checkerFrameworkVer" }
checkerframework-qual = { module = "io.github.eisop:checker-qual", version.ref = "checkerFrameworkVer" }
checkerframework-qual = { module = "io.github.eisop:checker-qual", version.ref = "checkerFrameworkVer" }
rohan-shettyy marked this conversation as resolved.
Show resolved Hide resolved