Skip to content

Build crash trying to add Checker Framework Gradle Plugin #1454

Open
@msridhar

Description

I wanted to play around with running the Checker Framework on WALA code, so I tried adding its Gradle plugin. My WIP change is here. With these changes, when I try to run Gradle I get a crash:

$ ./gradlew --dry-run --stacktrace
[...]
FAILURE: Build failed with an exception.
[...]
Caused by: org.gradle.api.InvalidUserDataException: Cannot change resolution strategy of dependency configuration ':checkerFramework' after it has been resolved.
        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.preventIllegalMutation(DefaultConfiguration.java:1507)
        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.validateMutation(DefaultConfiguration.java:1452)
        at org.gradle.api.internal.artifacts.ivyservice.resolutionstrategy.DefaultResolutionStrategy.eachDependency(DefaultResolutionStrategy.java:233)
        at com.diffplug.gradle.eclipse.MavenCentralExtension$ReleaseConfigurer.lambda$constrainTransitivesToThisReleaseExcept$5(MavenCentralExtension.java:127)
        at com.diffplug.gradle.eclipse.MavenCentralExtension$ReleaseConfigurer.constrainTransitivesToThisReleaseExcept(MavenCentralExtension.java:126)
        at com.diffplug.gradle.eclipse.MavenCentralExtension$ReleaseConfigurer.constrainTransitivesToThisRelease(MavenCentralExtension.java:121)
        at com.ibm.wala.gradle.Eclipse_maven_central_gradle$WalaMavenCentralReleaseConfigurerExtension.defaults$build_logic(eclipse-maven-central.gradle.kts:73)
        at com.ibm.wala.gradle.Eclipse_maven_central_gradle$2$1.invoke(eclipse-maven-central.gradle.kts:124)
        at com.ibm.wala.gradle.Eclipse_maven_central_gradle$2$1.invoke(eclipse-maven-central.gradle.kts:124)
        at com.ibm.wala.gradle.Eclipse_maven_central_gradle$2.execute(eclipse-maven-central.gradle.kts:128)
        at com.ibm.wala.gradle.Eclipse_maven_central_gradle$2.execute(eclipse-maven-central.gradle.kts:124)

Not too sure what the root cause would be. @liblit do you have any ideas? Nothing urgent.

Incidentally, we should probably document somewhere how to add new Gradle plugins to the WALA build. The set of changes I had to do seemed rather non-standard compared to any docs I found.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions