-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
feat(manager/gradle): reimplement parser using tree-based approach #18663
Conversation
looks good overall, will this PR solve #17657? |
…refactor � Conflicts: � lib/modules/manager/gradle/parser.spec.ts � lib/modules/manager/gradle/parser.ts
@PhilipAbed, this PR will not yet solve #17657 but a subsequent one. Implementation + tests for it are already ready and can be viewed in #18484 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
otherwise LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤷♂️
🎉 This PR is included in version 34.26.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Changes
handler.ts
, control and data flow were taken 1:1 from the existing implementationif (dep) { ... }
->if (!dep) { return ctx; }
Tokenizer, no longer needed types, etc of the existing parser are still there. I'd intend to do a follow-up cleaning PR.
apply from
The switch to the new parsing lib changed how
apply from
is implemented too:parseGradle
(more context here)Ctx
, which means no async calls possible. I'm aware of 2 alternatives:fs.readFileSync()
- disapproved here: feat(manager/gradle): add support for apply from statements #16030getFileContentMap()
to load Gradle files upfront. This is used hereapply from
respectsfileMatch
andignorePaths
nowContext
#18484
Documentation (please check one with an [x])
How I've tested my work (please tick one)
I have verified these changes via: