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

chore:cleaner dependencies #4149

Draft
wants to merge 23 commits into
base: master
Choose a base branch
from
Draft

Conversation

svandenhoek
Copy link
Contributor

@svandenhoek svandenhoek commented Aug 19, 2024

What are the main changes you did:

  • Solution for module-specific dependencies with shared versioning
  • Migrated the "dependencies for all subprojects" (except generic testing ones like junit) to their actual projects and filtered out the ones not needed per-module.
  • Tested for renovate support using LOG_LEVEL=debug renovate --platform=local > renovate.log. As shown below it seems that Renovate understands the changes.

master

{
                 "depName": "org.eclipse.rdf4j:rdf4j-rio-api",
                 "currentValue": "5.0.1",
                 "managerData": {
                   "fileReplacePosition": 1975,
                   "packageFile": "backend/build.gradle"
                 },
                 "fileReplacePosition": 1975,
                 "datasource": "maven",
                 "registryUrls": ["https://repo.maven.apache.org/maven2"],
                 "depType": "dependencies",
                 "updates": [
                   {
                     "bucket": "non-major",
                     "newVersion": "5.0.2",
                     "newValue": "5.0.2",
                     "releaseTimestamp": "2024-08-02T17:45:17.000Z",
                     "newMajor": 5,
                     "newMinor": 0,
                     "newPatch": 2,
                     "updateType": "patch",
                     "branchName": "renovate/org.eclipse.rdf4j"
                   }
                 ],

PR

"gradle": [
           {
             "packageFile": "gradle.properties",
             "datasource": "maven",
             "deps": [
               {
                 "depName": "org.eclipse.rdf4j:rdf4j-rio-api",
                 "currentValue": "5.0.1",
                 "groupName": "rdf4jVersion",
                 "managerData": {
                   "fileReplacePosition": 477,
                   "packageFile": "gradle.properties"
                 },
                 "fileReplacePosition": 477,
                 "datasource": "maven",
                 "registryUrls": ["https://repo.maven.apache.org/maven2"],
                 "depType": "dependencies",
                 "updates": [
                   {
                     "bucket": "non-major",
                     "newVersion": "5.0.2",
                     "newValue": "5.0.2",
                     "releaseTimestamp": "2024-08-02T17:45:17.000Z",
                     "newMajor": 5,
                     "newMinor": 0,
                     "newPatch": 2,
                     "updateType": "patch",
                     "branchName": "renovate/org.eclipse.rdf4j"
                   }
                 ],
  • explain what you changed and essential considerations.

how to test:

  • Check if module-specific dependencies are correct (by someone that knows per-module if the dependencies are in-line with expected).
  • Renovate dry-run through the command line (LOG_LEVEL=debug renovate --platform=local > renovate.log) should indicate it understands the changes that were made.
  • Check if once live Renovate still creates new PRs and also adjusts the version numbers in the right position.

todo:

  • updated docs in case of new feature
  • added/updated tests
  • added/updated testplan to include a test for this fix, including ref to bug using # notation

@svandenhoek svandenhoek changed the title Chore/cleaner dependencies chore:cleaner dependencies Aug 19, 2024
@svandenhoek svandenhoek marked this pull request as ready for review August 26, 2024 08:30
Copy link
Member

@mswertz mswertz left a comment

Choose a reason for hiding this comment

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

I need confirmation that this works with renovate before I can approve this. I find this not really much cleaner that it was before. In practice we are building one big fat jar so moving the shared dependencies to the /backend/build.gradle is in my mind better option.

@svandenhoek svandenhoek marked this pull request as draft August 28, 2024 08:04
@svandenhoek
Copy link
Contributor Author

I need confirmation that this works with renovate before I can approve this.

I checked with the Renovate CLI version (see initial PR message) to see if it spotted the gradle.properties file. Additionally:

Renovate can update:

  • *.gradle/*.gradle.kts files
  • Dependencies with version definitions in gradle.properties files

[...]

Source: https://docs.renovatebot.com/java/#gradle-file-support


so moving the shared dependencies to the /backend/build.gradle is in my mind better option.

Done (untested which I'll do later, but do let me know if this is indeed the preferred way compared to 1394ef5).

Copy link

sonarcloud bot commented Aug 28, 2024

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

Successfully merging this pull request may close these issues.

2 participants