-
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
Parse gemspec
files
#10616
Comments
As far as i understand the docs, we can use a simple regex to parse the deps. |
I encountered this same need just now and took a stab at a regexManager, its not working but maybe someone with more knowledge about these might know what is missing to get this over the line:
|
Hi there, Help us by making a minimal reproduction repository. Before we can start work on your issue we first need to know exactly what's causing the current behavior. A minimal reproduction helps us with this. To get started, please read our guide on creating a minimal reproduction to understand what is needed. We may close the issue if you (or someone else) have not provided a minimal reproduction within two weeks. If you need more time, or are stuck, please ask for help or more time in a comment. Good luck, The Renovate team |
The discussion already references examples like https://github.com/mdub/config_hound/blob/master/config_hound.gemspec |
This would be an example with some random diverse esample of dependencies from a few public repositories, I tried to get a few semi edge cases in there that can of course be removed too |
Tested this locally and it does not register in the logs of renovate except in the config So far unclear:
|
So for a feature request like this, our goal would be for a gemspec which is both minimal as well as covering all the use cases. There's no point in having 20 entries all with the same syntax, for example - and it slows things down by making debugging harder to do. We can move this to |
You can see the full list here: https://docs.renovatebot.com/modules/datasource/ (the answer is
See https://docs.renovatebot.com/modules/versioning/#ruby-versioning There is no one "semver" because semver itself defines no ranges at all, while most package managers have different syntax to each other for ranges. |
I created https://github.com/reggaemuffin/renovate-gemspec-minimal-example and will try to update it with the |
You can see a run of it as https://app.renovatebot.com/dashboard#github/reggaemuffin/renovate-gemspec-minimal-example/432999060 Not sure how to extract more information out of this but let me know if you have any ideas |
We'd also like something like this. We're currently manually upgrading gemspecs using a bash script. |
Any progress on this per chance? |
FWIW @narwold we switched to DependaBot which supports this out of the box. |
@marvin-bitterlich at a glance it seems your attempt at using the regex matcher won't work because you start the regex with
|
I've created a working version of the regex manager here: https://github.com/mpkorstanje/renovate-gemspec-minimal-example {
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base",
],
"regexManagers": [
{
"fileMatch": [
"^*.gemspec"
],
"matchStrings": [
".*\\.add_(:?(?<depType>.*?)_)?dependency\\s*(['\"])(?<depName>[^'\"]+)(['\"])(\\s*,\\s*(?<currentValue>(['\"])[^'\"]+['\"](\\s*,\\s*['\"][^'\"]+['\"])?))?"
],
"datasourceTemplate": "rubygems",
"versioningTemplate": "ruby"
}
]
} |
"customManagers": [
{
"customType": "regex",
"fileMatch": ["^*.gemspec"],
"matchStrings": [
".*\\.add_(:?(?<depType>.*?)_)?dependency\\s*(['\"])(?<depName>[^'\"]+)(['\"])(\\s*,\\s*(?<currentValue>(['\"])[^'\"]+['\"](\\s*,\\s*['\"][^'\"]+['\"])?))?"
],
"datasourceTemplate": "rubygems",
"versioningTemplate": "ruby"
}
], But now I have this error in dashboard:
|
I'll deal with Depfu for now. renovatebot/renovate#10616 (comment)
Yup. Fairly easy to reproduce. Updated https://github.com/mpkorstanje/renovate-gemspec-minimal-example with the It appears that this code here: renovate/lib/modules/manager/index.ts Lines 79 to 83 in 3bfad40
Is checking against the renovate/lib/modules/manager/index.ts Lines 16 to 19 in 3bfad40
Started a new issue here #28090 |
Hi! Is there any chance of gemspec support soon? On our particular case we defined In this case, the manager should update ranges in the gemspec but also the Gemfile.lock definition. References: |
How can we move on with this issue? |
Currently someone has to do the work. Either to get the custom manager working or to provide a fully featured manager for gemspec files. I made an analysis of the problems with the current custom manager in #28090 and I think they should be relatively easy to solve. But I've not yet found the space for it. Feel free to help out. |
What would you like Renovate to be able to do?
Copy/paste of comment from @rarkins in discussion #10585.
Did you already have any implementation ideas?
Nope. 😄
The text was updated successfully, but these errors were encountered: