Skip to content

Conversation

@reaver585
Copy link
Contributor

Addresses #49743

@quarkus-bot quarkus-bot bot added area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/gradle Gradle labels Oct 2, 2025
@reaver585 reaver585 force-pushed the manual-platform-spec branch 6 times, most recently from df0cf7e to 75b80ed Compare October 3, 2025 20:13
@aloubyansky
Copy link
Member

We definitely want some tests for this change. That would basically mean pre-installing two versions of an extension (as part of a test) that is a conditional dependency. And then writing a few tests:

  • when the version is enforced
  • when the version is not enforced
  • when a conditional dependency is excluded by a user

@quarkus-bot

This comment has been minimized.

@reaver585 reaver585 force-pushed the manual-platform-spec branch 2 times, most recently from 5bd8fcf to 5902456 Compare October 13, 2025 20:12
@reaver585
Copy link
Contributor Author

We definitely want some tests for this change. That would basically mean pre-installing two versions of an extension (as part of a test) that is a conditional dependency. And then writing a few tests:

  • when the version is enforced
  • when the version is not enforced
  • when a conditional dependency is excluded by a user

@aloubyansky should be done now.

@quarkus-bot

This comment has been minimized.

Copy link
Member

@aloubyansky aloubyansky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@reaver585 this is looking good to me, thanks a lot!
I added a few remarks but they are not blocking this change from merging.

}

if (matchingConstraints.size() > 1) {
throw new RuntimeException("Multiple matching constraints for " + dep + ": " + matchingConstraints);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could happen and we shouldn't fail. I think, what could help is catching these clashes early, when we initialize a PlatformSpec.

For example, there could be multiple artifacts mentioned in the BOM with the same group and artifact IDs but different classifiers and/or types. They could even have the same version. Let's make sure this does not result in an error.

Then, on purpose or not, a BOM (the original Maven POM XML, at least) may include different versions of the same artifact. It doesn't make sense but it may happen. In this case, the first occurrence should be the effective one.

A tricky case would be when org.acme:acme-lib:1.0 and org.acme:acme-lib:some-classifier:2.0 are found among the constraints. Then it's kinda difficult to pick a common version for org.acme:acme-lib.
To avoid that, ideally, we should be using groupId:artifactId:classifier:type when recording constraints and during matching.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed bilaterally, we are not going to implement such functionality, mapping GA to a list of constraints, because, when we process the platform configuration and its DependencyResultDetails in here, all such DependencyResultDetails are already deduped based on GA. So, multiple constraints for a unique GA aren't exposed to us, despite they are actually declared in Quarkus' platform BOM.

Moreover, neither classifier, nor type, and nor the exludeRules in these processed BOM dependencies.

@reaver585
Copy link
Contributor Author

@gsmet quick question: do you know if I can access the test reports?

On the previous pipeline run, a test (JVM 25) job failed, GHA logs are definitely not enough, and the uploaded artifacts on the summary page get me an archive (test-reports-JVM Tests - JDK 25) with some dirs but no files at all.

@reaver585 reaver585 force-pushed the manual-platform-spec branch from 0aa6b50 to 7336c76 Compare October 15, 2025 19:28
@reaver585 reaver585 force-pushed the manual-platform-spec branch 3 times, most recently from 207f41c to 9bba02a Compare October 20, 2025 21:11
@quarkus-bot

This comment has been minimized.

@reaver585 reaver585 force-pushed the manual-platform-spec branch from 9bba02a to 8b5cef2 Compare October 21, 2025 22:56
@reaver585 reaver585 requested a review from aloubyansky October 21, 2025 23:02
@reaver585 reaver585 force-pushed the manual-platform-spec branch from 8b5cef2 to c315a0e Compare October 22, 2025 06:58
Copy link
Member

@aloubyansky aloubyansky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @reaver585 !

@quarkus-bot
Copy link

quarkus-bot bot commented Oct 22, 2025

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit c315a0e.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.

@aloubyansky aloubyansky merged commit 86b175f into quarkusio:main Oct 22, 2025
24 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.30 - main milestone Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/gradle Gradle triage/backport

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants