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

Gradle plugin doesn't support configuration cache #462

Open
sschuberth opened this issue Dec 19, 2024 · 7 comments
Open

Gradle plugin doesn't support configuration cache #462

sschuberth opened this issue Dec 19, 2024 · 7 comments
Assignees

Comments

@sschuberth
Copy link

I'm using Gradle 8.11.1 with the following gradle.properties:

org.gradle.caching = true
org.gradle.configuration-cache = true
org.gradle.configuration-cache.parallel = true

In a build that applies id("org.graalvm.python").version("24.1.1") as a plugin, the Gradle task configuration triggers

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':plugins:package-managers:python-package-manager:graalPyResources'.
> Configuration with name 'implementation' not found.

[...]

2: Task failed with an exception.
-----------
* What went wrong:
Configuration cache problems found in this build.

1 problem was found storing the configuration cache.
- Task `:plugins:package-managers:python-package-manager:graalPyResources` of type `org.graalvm.python.tasks.ResourcesTask`: invocation of 'Task.project' at execution time is unsupported.
  See https://docs.gradle.org/8.11.1/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
@sschuberth
Copy link
Author

Here's a screenshot from the report:

image

@sschuberth
Copy link
Author

Ah, looks like this was already fixed with 32f68ad, but that fix is not included in release 24.1.1. If that's correct, could we get a new plugin release?

@msimacek
Copy link
Contributor

Hi @sschuberth, thank you for the report. Unfortunately, our release engineering is deeply tied into Graal's and we're not able to release the plugin outside of the normal release schedule. The next release should happen on 18th of March.

@steve-s could you please check if the bug is really fixed?

@sschuberth
Copy link
Author

Unfortunately, our release engineering is deeply tied into Graal's and we're not able to release the plugin outside of the normal release schedule.

But I guess that's more a policy-wise restriction than a pure technical restriction, right?

The next release should happen on 18th of March.

Ouch 😬 I really cannot wait that long.

Just hypothetically, would you guys mind if I publish a fork of that plugin with the fix included?

@msimacek
Copy link
Contributor

But I guess that's more a policy-wise restriction than a pure technical restriction, right?

I think so, but I'm persnally not familiar with the details.

Just hypothetically, would you guys mind if I publish a fork of that plugin with the fix included?

It's opensource, sure you can fork.

I should have mentioned that in the previous comment, but we have snapshot builds. At https://github.com/graalvm/graalvm-ce-dev-builds/releases/ you can find maven-resource-bundle-community-dev.tar.gz which contains maven artifacts. I'm not 100% sure it contains the plugin, and my internet is taking forever to download it, so forgive me if it's not there. You should be able to point your gradle at it as a maven repository (you probably need to set it both as a normal repository and plugin repository). You should be able to do that in your init.gradle without polluting the project settings.

@msimacek
Copy link
Contributor

This is the ~/.gradle/init.gradle that should be able to pick up artifacts from an extracted tarball (you need to replace the two paths):

allprojects {
    repositories {
        mavenLocal()
        maven {
          url "file:///path/to/repository"
        }
        mavenCentral()
    }
}

apply plugin: GraalPyRepositoryPlugin

class GraalPyRepositoryPlugin implements Plugin<Gradle> {

    void apply(Gradle gradle) {
        gradle.settingsEvaluated { settings ->
            settings.pluginManagement {
                repositories {
                    maven { url "file:///path/to/graalpy-repository" }
                    gradlePluginPortal()
                    mavenCentral()
                }
            }
        }
    }
}

@sschuberth
Copy link
Author

I should have mentioned that in the previous comment, but we have snapshot builds.

Thanks, I'll probably try these out soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants