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

managed-version not inlined if used for bom, but not dependency #611

Closed
timyates opened this issue Sep 11, 2023 · 0 comments · Fixed by #612
Closed

managed-version not inlined if used for bom, but not dependency #611

timyates opened this issue Sep 11, 2023 · 0 comments · Fixed by #612
Labels
bug Something isn't working

Comments

@timyates
Copy link
Contributor

In micronaut-test, we declare a version managed-junit (link)

managed-junit = "5.10.0"

This is not used for any managed- dependencies, but it is used for boms-junit in the catalog.

This managed version is not inlined into the micronaut-platform catalog, which (after discussion) we believe is a bug.

@timyates timyates added the bug Something isn't working label Sep 11, 2023
melix added a commit that referenced this issue Sep 13, 2023
This commit fixes a problem where some aliases were not inlined
in the platform BOM. For example, the `junit` BOM dependency
is missing from the platform, despite `micronaut-test` including
it.

The reason is that in `micronaut-test`, `junit` is a managed
version, but for a BOM (alias `boms-...`). There were 2 ways
to fix this problem:

1. include all versions from the embedded catalog during
inlining. This worked, but with a drawback: only the version
would be included (e.g `junit`), but no library would be present.
Which means that the user would still have to figure out the
coordinates of, say, the junit BOM.
2. the fix in this PR, which is to include `boms-` dependencies
into the generated catalog. This works well and should be
backwards compatible, since we're only adding new entries to
the catalogs.

It's worth noting that we _don't_ do this for `boms-micronaut-`
entries, which, in this case, are available as independent
version catalogs. Including them would lead to potentially
many BOM inclusion conflicts, since many projects may include
other Micronaut BOMs.

Fixes #611
melix added a commit that referenced this issue Sep 13, 2023
This commit fixes a problem where some aliases were not inlined
in the platform BOM. For example, the `junit` BOM dependency
is missing from the platform, despite `micronaut-test` including
it.

The reason is that in `micronaut-test`, `junit` is a managed
version, but for a BOM (alias `boms-...`). There were 2 ways
to fix this problem:

1. include all versions from the embedded catalog during
inlining. This worked, but with a drawback: only the version
would be included (e.g `junit`), but no library would be present.
Which means that the user would still have to figure out the
coordinates of, say, the junit BOM.
2. the fix in this PR, which is to include `boms-` dependencies
into the generated catalog. This works well and should be
backwards compatible, since we're only adding new entries to
the catalogs.

It's worth noting that we _don't_ do this for `boms-micronaut-`
entries, which, in this case, are available as independent
version catalogs. Including them would lead to potentially
many BOM inclusion conflicts, since many projects may include
other Micronaut BOMs.

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

Successfully merging a pull request may close this issue.

1 participant