-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
SplitPackageProcessor picks up duplicates via test-jar that are not actually in that test-jar #19030
Comments
I guess I should debug this: quarkus/extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/SplitPackageProcessor.java Line 56 in d0555c7
|
It's very likely that the jar has the same |
I don't think it's "overzealous". It does not fail the build but logs some warnings if something is wrong and if I'm not mistaken a split package is problematic not only for dependency injection but in general in Java 11+. |
I don't mind changing the title (or if you do). 🙂
We don't use the classifier, but I did a quick debug session and I think the actual problem is that We use Somehow, (it seems) that the index is "too big". |
I see. So the type should be added as well ;-). |
The type is there already in AppArtifactKey! I have yet to check PS: I don't see the processor doing anything with GAV etc., which is actually good in this case. |
Interesting, it doesn't seem to have one: https://github.com/quarkusio/quarkus/blob/2.1.0.Final/core/deployment/src/main/java/io/quarkus/deployment/ApplicationArchiveImpl.java Anyway, I think I now do understand why the index contains packages that are not in that test-jar: |
Actually, the current information would have been enough, but as part of this commit an ordering was imposed which led to creation of the set that now has the problem with uniqueness of its elements. Here is a PR that adds type and classifier to each archive - #19054 |
@famod are you going to look into adding hashCode/equals to the ApplicationArchiveImpl? |
How is that a problem here? Why should
No time for that, sorry. As I stated previously, this is not the main problem here (which doesn't mean it shouldn't be addressed), it's the index for that test-jar that contains too many known classes. |
You are correct that they shouldn't be equal. All I am saying is that the |
@manovotn @mkouba @aloubyansky can anyone of you point me to where an index is created when a beans.xml is found? |
I could have a look. There is no reproducer readily available, is there? |
No. I can try to hack something later. |
@aloubyansky I recycled an older example project (which has a weird name 😉 ): https://github.com/famod/modmono-quarkus/tree/issue-19030-test-jar-index (make sure to switch to branch
or with 999-SNAPSHOT a bit more detailed:
|
So FTR, as discussed on Zulip, a solution could be to not re-index for test runs but to just use the existing index. I have to say though that this might not work in my case because I have two test-jars and while I can tell |
Describe the bug
With 2.1.0, when running tests in some of our modules, we are seeing this:
What's interesting is that only a single artifact is listed (
de.somecompany.someproject:register-core
).That
register-core
module is producing atest-jar
that is present on the test classpath of the module that is issuing the warnings (here:register-api
).That test-jar of register-core has a distinct package, but maybe the processor is somehow confused with this?
Expected behavior
No such warnings.
Actual behavior
Many warnings.
How to Reproduce?
See #19030 (comment)
Output of
uname -a
orver
Linux W4DEUMSY9003463 5.4.72-microsoft-standard-WSL2 #1 SMP Wed Oct 28 23:40:43 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
But also happens on Jenkins.
Output of
java -version
OpenJDK 64-Bit Server VM AdoptOpenJDK-11.0.11+9 (build 11.0.11+9, mixed mode)
GraalVM version (if different from Java)
n/a
Quarkus version or git rev
2.1.0.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.1
Additional information
n/a
The text was updated successfully, but these errors were encountered: