Potentially increase maxDepth
of Gradle (Groovy) parser
#32513
mattmapadmi
started this conversation in
Suggest an Idea
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Tell us more.
I've inherited an Android project with an obnoxiously large app-level build.gradle (400+ lines, with a 188 line Flavours block), and when adding Renovate, I've found that it is unable to find deprecated packages within the
dependencies
block at the bottom of the file. It will find things in theplugins
block at the top, and if I move mydependencies
block above theandroid
block, that also works.Almost by pure fluke, I found that by changing
maxDepth
to 48 in the parser config, it starts working again.renovate/lib/modules/manager/gradle/parser.ts
Line 54 in 40a6004
Looking at the good-enough-parser's defaults, they set it to 1024 by default, so 32 seems to be very low.
https://github.com/zharinov/good-enough-parser/blob/2bd0a2f2d3b04d2c3572d8efebe362cdcc8a815b/lib/query/matchers/tree-matcher.ts#L39
I know the solution on my side is to tidy up the config (and use a Version Catalog), but I just wanted to flag it, as it fails in an incredibly vague way, and it may be something not taken into account when setting the
maxDepth
originally.Beta Was this translation helpful? Give feedback.
All reactions