-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
manager(gradle): no deps detected when 3 dep strings present in the configuration #30234
Comments
This is still broken. I would like to submit a PR myself but I'd need some guidance on how the matching works, since the library Renovate uses has very little documentation. |
@zharinov can you advise? |
@bh-tt is this edge-case specific to configurations provided by the testImplementation(
'org.junit.jupiter:junit-jupiter-api:5.6.2',
'org.junit.jupiter:junit-jupiter-params:5.6.3',
'jakarta.ws.rs:jakarta.ws.rs-api:2.1.6'
) I'm asking because I can't find declarations other than with a single dep in the gradle docs: The issue is that renovate's gradle manager has a dependency matching heuristic that searches If this edge-case is specific to (some?) gradle configurations of the // Update: After digging into this a bit more, I found that this works due to syntactic sugar in Groovy itself. There is no Probably it works to tweak the matcher such that the 3rd arg must not include |
Thanks for the digging, I took a quick look friday and also could not find a method accepting multiple args and had not gone further yet. I'm aware rewriting the definitions is easier, but that is hard to implement over our 1000+ java projects, all in gradle. I could do a single pass over all of them in a week or so, but having all our developers keep this information in mind when adding a dependency somewhere would not be easy. Eventually someone would add a third dependency to a block, and since gradle simply accepts that it would take a long time before we would notice this. I agree excluding a I did just try a notation like you suggested ( |
I guess
Edit: I've searched backwards up to gradle version 3.5.1 (released in june 2017, long out of support) and I cannot find information allowing this syntax. I've tried using the kotlin syntax but since I'm unfamiliar with that it might take some time to test. |
The syntax with 3 separate strings, without keys seems to be supported for Kotlin buildscripts, but not for groovy build scripts. Perhaps the simplest solution here is to apply the 3 string matcher only to .gradle.kts files? |
build.gradle.kts
Results in:
Whereas build.gradle:
Results in:
I think the first case is also kotlin synthetic sugar, parsing the 3 strings into a map? I'm running with gradle 8.10.1 |
@Churro I wondered if you've had time to look at my comments above? It seems like renovate accepts some notation that gradle itself does not, causing this bug. |
@bh-tt, I'm aware of a bug in renovate's gradle parser that is related to initial issue description and can be reproduced. I have a fix for it ready and will submit a PR when I'm sure that there are no unwanted side effects. |
🎉 This issue has been resolved in version 39.96.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Edit: this is likely caused by running 2 different versions of renovate, one with this fix and one without. |
Describe the proposed change(s).
Ref: #30232
Gradle manager does not detect any dep when 3 dependency strings are present in
testImplementation
(or, possibly any other configuration).Reproduction: https://github.com/bh-tt/renovate-tt-gradle-reproducer
The text was updated successfully, but these errors were encountered: