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

Quarkus 2.4 dev mode wrongly detects ambiguous beans when using workspace artifacts with classifiers #21326

Closed
famod opened this issue Nov 9, 2021 · 1 comment · Fixed by #22336
Assignees
Labels

Comments

@famod
Copy link
Member

famod commented Nov 9, 2021

Describe the bug

Dev mode "sees" duplicate classes when there is a dependency with a classifer that is produced by a workspace module.

E.g.

  • module B depends on module A
  • module A also produces a "secondary" artifact with a classifier, containing e.g. test-support mocks for interfaces A depends on
  • module B also depends on module A's secondary artifact, e.g. via a Maven profile
  • the secondary module A artifact does not include all/any of the classes from src/main/java (let's assume for simplicity that it only contains a single class from src/test/java)

With such a setup, dev mode in module B will:

  • produce many warnings w.r.t split packages
  • fail with ambiguous bean errors

Both effects are very unexpected because the secondary artifact of A does not contain any such duplicates or conflicts.

Expected behavior

No warning or error, dev mode should run just fine

Actual behavior

Dev mode breaks with ArC errors

How to Reproduce?

None yet, @aloubyansky mentioned on Zulip that he'll create one.

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.4.1.Final

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.8.1

Additional information

This is probably a problem in how the jandex index is built in this case.

This issue seems similar to #19030.

Discussed here: https://quarkusio.zulipchat.com/#narrow/stream/187038-dev/topic/bootstrap.20refactoring/near/260381333

@famod famod added the kind/bug Something isn't working label Nov 9, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Nov 9, 2021

You added a link to a Zulip discussion, please make sure the description of the issue is comprehensive and doesn't require accessing Zulip.

This message is automatically generated by a bot.

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

Successfully merging a pull request may close this issue.

2 participants