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

Bug: property 'defaultVersionCatalogFile$refreshVersions_core' specifies file '${projectRoot}/gradle/libs.versions.toml' which doesn't exist #698

Closed
1 task done
charles-santos-wd opened this issue Aug 21, 2023 · 2 comments
Assignees

Comments

@charles-santos-wd
Copy link

charles-santos-wd commented Aug 21, 2023

🐛 Describe the bug

Upgraded from 0.51.0 to 0.60.0 and now trying to run refreshVersions fails.
My refreshVersions configuration is the following:

refreshVersions {
    @Suppress("UnstableApiUsage")
    rejectVersionIf {
        candidate.stabilityLevel isLessStableThan StabilityLevel.Stable
    }

    extraArtifactVersionKeyRules("""
        < some internal Workday group+artifact name rule which has never caused problems >
    """.trimIndent())
}

And I use only versions.properties — none of the Gradle version catalog stuff.

⚠️ Current behavior

Task refreshVersions fails:

> Task :refreshVersions FAILED

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':refreshVersions' (type 'RefreshVersionsTask').
  - In plugin 'de.fayard.refreshVersions.core.RefreshVersionsCorePlugin' type 'de.fayard.refreshVersions.core.RefreshVersionsTask' property 'defaultVersionCatalogFile$refreshVersions_core' specifies file '/Users/charles.santos/code/yuzu-libs/gradle/libs.versions.toml' which doesn't exist.
    
    Reason: An input file was expected to be present but it doesn't exist.
    
    Possible solutions:
      1. Make sure the file exists before the task is called.
      2. Make sure that the task which produces the file is declared as an input.
    
    For more information, please refer to https://docs.gradle.org/8.2.1/userguide/validation_problems.html#input_file_does_not_exist in the Gradle documentation.

✅ Expected behavior

Task refreshVersions should do what it's expected to do — update my versions.properties file with dependency upgrades.

💣 Steps to reproduce

It looks like it's as simple as using just versions.properties in 0.51.0 and upgrading to 0.60.0. I performed the upgrade in another one of my projects and I ran into the same failure.

Updated with reproduction repo:

Clone https://github.com/charles-santos-wd/refreshVersions-698 , and run ./gradlew refreshVersions

📱 Tech info

No build scans as it's a private corporate repository 😞

Workaround

Add

featureFlags {
    disable(FeatureFlag.VERSIONS_CATALOG)
}

to refreshVersions { ... } config in settings.gradle.kts to forcibly turn off the Version Catalog feature.

@LouisCAD LouisCAD self-assigned this Aug 22, 2023
@charles-santos-wd
Copy link
Author

Updated with a reproduction repo

@LouisCAD
Copy link
Member

Should have written that I was able to reproduce myself. Fix incoming :)

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

No branches or pull requests

2 participants