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

Devmode should be recognizing compile-only and runtime-only dependencies #9422

Open
aloubyansky opened this issue May 18, 2020 · 9 comments
Open
Labels
kind/bug Something isn't working

Comments

@aloubyansky
Copy link
Member

Gradle supports compileOnly and runtimeOnly classpath dependencies. However, at this point our devmode support does not allow isolating compileOnly dependencies from the runtime classpath.
And isolate the runtimeOnly classpath from the compile classpath.

fyi @stuartwdouglas

@aloubyansky aloubyansky added the kind/bug Something isn't working label May 18, 2020
@stuartwdouglas
Copy link
Member

Maven has the same thing (provided = compileOnly, runtime=runtimeOnly).

I actually just ran into an issue caused by this with my reagument PR, we are resolving provided deps which includes graal svm, which includes a bundled old version of ASM.

If I get time today I might make an attempt at this based on your PR for the 'test dep leakage' issue.

@aloubyansky
Copy link
Member Author

I thought about Maven and provided opening this issue too. It's not the same. provided is (mis)used for that. But what provided means is "use the dependency for compilation only, it will be provided at runtime by the environment". In that case we should be including provided for running the app. I am not sure the promise is the same for compileOnly in Gradle.

@stuartwdouglas
Copy link
Member

I don't think we should be supplying 'provided', otherwise from the point of view of Quarkus it is the same as 'compile'.

We also use provided for artifacts that we expect substrate VM to provide, which definitely should not go into the app.

@aloubyansky
Copy link
Member Author

You are right, I was just thinking the same. So, yes, we should not included provided.

@FWest98
Copy link
Contributor

FWest98 commented May 26, 2024

We are running into this issue, where we'd like to have some dependencies as compileOnly in Gradle, but Quarkus doesn't like this in dev mode...

@aloubyansky
Copy link
Member Author

As provided in Maven? Keep in mind that provided dependencies are added to the test runtime classpath by Maven itself (and Quarkus too).

@FWest98
Copy link
Contributor

FWest98 commented May 27, 2024

I use Gradle as follows:

compileOnly("foo.bar")
testImplementation("foo.bar")

For non-Quarkus projects, this works perfectly fine. However, when trying to run the tests in the Quarkus project, I get:

Execution failed for task ':project:quarkusGenerateCode'.
> Could not resolve all dependencies for configuration ':project:quarkusProdCompileOnlyConfiguration'.
   > Could not find com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:.
     Required by:
         project :project

@aloubyansky
Copy link
Member Author

Could you please create a new issue and attach a reproducer? Thanks

@FWest98
Copy link
Contributor

FWest98 commented Jun 4, 2024

Turns out I was running into #39073, so a different issue than this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants