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

Use and export kotest-bom for kotest dependencies management #844

Merged
merged 1 commit into from
Sep 11, 2023

Conversation

Spikhalskiy
Copy link
Contributor

@Spikhalskiy Spikhalskiy commented Sep 2, 2023

micronaut-test-kotest5 now uses and exposes kotest-bom

Related PR into micronaut-platform: micronaut-projects/micronaut-platform#901
Closes #843

@CLAassistant
Copy link

CLAassistant commented Sep 2, 2023

CLA assistant check
All committers have signed the CLA.

@Spikhalskiy
Copy link
Contributor Author

Spikhalskiy commented Sep 2, 2023

Ideally explicit versions should be removed from

managed-kotest-assertions-core-jvm = { module = "io.kotest:kotest-assertions-core-jvm", version.ref = "managed-kotest" }
managed-kotest-runner-junit5-jvm = { module = "io.kotest:kotest-runner-junit5-jvm", version.ref = "managed-kotest" }

and

junit-jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "managed-junit" }
junit-jupiter-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "managed-junit" }
junit-jupiter-params = { module = "org.junit.jupiter:junit-jupiter-params", version.ref = "managed-junit" }

above it.

But when I try to do that I get

* What went wrong:
Could not determine the dependencies of task ':micronaut-test-bom:build'.
> Could not create task ':micronaut-test-bom:assemble'.
   > Could not create task ':micronaut-test-bom:generateCatalogAsToml'.
      > A dependency constraint was added on 'io.kotest:kotest-assertions-core-jvm' without a version. This is invalid: a constraint must specify a version.

I guess these constraints are getting added by an internal micronaut tooling ("io.micronaut.build.internal.bom" plugin?). But the message doesn't have enough info to easily untangle this without tracing back the source of the message. I didn't put time into figuring it out yet, so I left it as-is for now looking at the fact that it already was done for junit.

@sdelamo sdelamo requested review from timyates and melix September 11, 2023 08:58
@sdelamo sdelamo added relates-to: build label for issues related to the build file or CI type: improvement A minor improvement to an existing feature labels Sep 11, 2023
Copy link
Contributor

@melix melix left a comment

Choose a reason for hiding this comment

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

Can you move the managed-kotest entries back to where they were? They are intentionally grouped by managed-.

Thanks

@Spikhalskiy
Copy link
Contributor Author

@melix done. I moved them into "managed-by-boms" group because I was going to drop the explicit specification of the version, but wasn't able to do that as described above. Moved them back.

@melix
Copy link
Contributor

melix commented Sep 11, 2023

No, please keep them as is. Do not rename them as it's a breaking change. We use conventions, and these lead to properties in BOM files, or type-safe accessors in catalogs. Any change in the name is a breaking change. Thanks!

Update: sorry I thought you renamed the aliases, realizing you didn't :)

@timyates timyates merged commit fdd5dff into micronaut-projects:master Sep 11, 2023
3 checks passed
@timyates
Copy link
Contributor

Thanks for this @Spikhalskiy 👍

@Spikhalskiy Spikhalskiy deleted the issue-843 branch September 11, 2023 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relates-to: build label for issues related to the build file or CI type: improvement A minor improvement to an existing feature
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

kotest-bom should be used to manage kotest versions
5 participants