Skip to content

Conversation

alecgrieser
Copy link
Collaborator

@alecgrieser alecgrieser commented Oct 1, 2025

This makes a few changes to the way that we handle the relational CLI jar.

Firstly, it migrates the Relational CLI project from some custom code that would copy classes into the Jar to using the "shadow" plugin already in use in other sub-projects to create the combined Jar.

Secondly, it updates the artifacts for that project so that we now publish the combined jar as fdb-relational-cli-${VERSION}-all.jar, and so the "base" jar contains only that subproject's logic, which is more in line with the way the rest of the project's are published. That does mean that anyone who is relying on using the combined jar should switch their dependency from: group: 'org.foundationdb', name: 'fdb-relational-cli' to group: 'org.foundationdb', name: 'fdb-relational-cli', classifier: 'all'. I did double check the CLI script that we have in the repo: (https://github.com/FoundationDB/fdb-record-layer/blob/main/fdb-relational-cli/bin/fdb-relational-sqlline). That script relies on invoking the generated command line script that is generated during building, and that has logic to set the class path correctly so that we get the dependencies, so it should still work.

Thirdly, we now build the jar during code coverage report analysis. This allows code coverage to more accurately report on the classes from Relational CLI. You can see this in a recent teamscale run. Compare: Customize.java coverage with the new changes to Customize.java coverage on main. Note that the file is marked as fully covered with the changes here, whereas it was reported as missing data before.

@alecgrieser alecgrieser added the build improvement Improvement to the build system label Oct 1, 2025
@alecgrieser alecgrieser changed the title add jar compilation to the PR jobs Cover the CLI classes in coverage report and publish CLI combined Jar separately from base Jar Oct 2, 2025
@alecgrieser alecgrieser changed the title Cover the CLI classes in coverage report and publish CLI combined Jar separately from base Jar Publish CLI combined Jar as separate "-all artifact from the Oct 2, 2025
@alecgrieser alecgrieser changed the title Publish CLI combined Jar as separate "-all artifact from the Publish CLI combined Jar as separate artifact from the base Jar and fix coverage report Oct 2, 2025
@alecgrieser alecgrieser added the breaking change Changes that are not backwards compatible label Oct 2, 2025
@alecgrieser alecgrieser marked this pull request as ready for review October 2, 2025 08:50
@alecgrieser alecgrieser requested a review from hatyo October 2, 2025 08:51
@alecgrieser alecgrieser changed the title Publish CLI combined Jar as separate artifact from the base Jar and fix coverage report Publish CLI combined Jar as separate artifact from the base Jar and fix code coverage report Oct 2, 2025
Copy link
Contributor

@hatyo hatyo left a comment

Choose a reason for hiding this comment

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

LGTM.

@alecgrieser alecgrieser merged commit ca914bc into FoundationDB:main Oct 2, 2025
9 checks passed
@alecgrieser alecgrieser deleted the cli-to-shadow-jar branch October 2, 2025 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Changes that are not backwards compatible build improvement Improvement to the build system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants