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

Cannot build Quarkus after removing ~/.m2/repository/io/quarkus/ or ~/.m2/repository/io/quarkus/gizmo #26

Closed
ppalaga opened this issue May 6, 2020 · 5 comments
Labels
wontfix This will not be worked on

Comments

@ppalaga
Copy link
Contributor

ppalaga commented May 6, 2020

Steps to reproduce

rm -Rf ~/.m2/repository/io/quarkus/gizmo
git clone https://github.com/quarkusio/quarkus.git
cd quarkus
mvnd clean install -DskipTests -DskipITs -Denforcer.skip -Dquarkus.build.skip -DskipDocs

Expected: build success
Actual: ArC Processor and Qute Generator are complaining about missing gizmo during compilation:

[�[1;31mERROR�[m] Failed to execute goal �[32morg.apache.maven.plugins:maven-compiler-plugin:3.8.0-jboss-2:compile�[m �[1m(default-compile)�[m on project �[36mqute-generator�[m: �[1;31mCompilation failure�[m: Compilation failure: 
[�[1;31mERROR�[m] /home/ppalaga/orgs/quarkus/quarkus/independent-projects/qute/generator/src/main/java/io/quarkus/qute/generator/ValueResolverGenerator.java:[5,24] package io.quarkus.gizmo does not exist
...
[�[1;31mERROR�[m] Failed to execute goal �[32morg.apache.maven.plugins:maven-compiler-plugin:3.8.0-jboss-2:compile�[m �[1m(default-compile)�[m on project �[36marc-processor�[m: �[1;31mCompilation failure�[m: Compilation failure: 
[�[1;31mERROR�[m] /home/ppalaga/orgs/quarkus/quarkus/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/AnnotationLiteralProcessor.java:[4,24] package io.quarkus.gizmo does not exist

It is very strange that there is no trace of gizmo in the local maven repo under ~/.m2/repository/io/quarkus/gizmo I'd expect maven to download it. I do not see any download related error in the log.

@gnodet
Copy link
Contributor

gnodet commented May 6, 2020

Yes, this is certainly a caching problem. I suppose this one is caused by the https://github.com/gnodet/mvnd/blob/master/daemon/src/main/java/org/jboss/fuse/mvnd/plugin/CliPluginRealmCache.java which purpose is to cache the classloaders / classes for each plugin. I think the current check verifies the input used to build the classloader, but not the files stored in the repository. I assumed the existing files in the repository to be immutable.

However, I've added some checks some time ago with the TimestampedCacheRecord https://github.com/gnodet/mvnd/blob/master/daemon/src/main/java/org/jboss/fuse/mvnd/plugin/CliPluginRealmCache.java#L155-L214 so not sure what's happening.

Actually, it could be related to #25 if using snapshots.

@ppalaga
Copy link
Contributor Author

ppalaga commented May 6, 2020

Oh, I see a simple workaround could be to stop the daemon after messing with the local repo.

@gnodet
Copy link
Contributor

gnodet commented May 6, 2020

Yes, this can easily be done with mvnd --stop.

@ppalaga
Copy link
Contributor Author

ppalaga commented Jul 31, 2020

I can say after some debugging that this is not (at least directly) related to CliPluginRealmCache. The error is thrown by the compiler plugin whose class realm does not contain gizmo at all. It is the compiled classes which depend on Gizmo.

So it might be a class loader caching issue, but rather related to caching of project dependencies, or jars (maybe some variant of https://bugs.openjdk.java.net/browse/JDK-8246714 ) or similar. We should have a look how the compiler plugin assembles the build path and whether there is some Maven specific caching in place there.

@ppalaga
Copy link
Contributor Author

ppalaga commented Jan 7, 2021

Duplicate of #312

@ppalaga ppalaga marked this as a duplicate of #312 Jan 7, 2021
@ppalaga ppalaga closed this as completed Jan 7, 2021
@ppalaga ppalaga added this to the No fix/wont't fix milestone Jan 7, 2021
@gnodet gnodet added the wontfix This will not be worked on label Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants