-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
supporting rangeStrategy=update-lockfile with mix manager #13618
Comments
Reproduction: https://github.com/renovate-reproductions/13618 |
Happy to help if needed. |
any update on this? I just got into this issue as well as the one around having to pin an application exactly and was wondering how are people using it for libaries in Elixir. This makes it difficult to adopt renovate which I really like |
I took a look at the code but honestly I couldn't make heads nor tails of it. If anyone has any pointers on how to make it work I'll happily work up a PR. |
First step we could get help on is: does mix have a command where you can tell it to update a locked version of a dependency to a specific version? e.g. let's say the package file has a range like 1.x and the lock file is on 1.1.0. Let's also say versions 1.2.0 and 1.3.0 exist, and we want to update specifically to 1.2.0. Is there a command which lets us either (a) update specifically to 1.2.0, or (b) at least update to the latest matching version, which is 1.3.0? Alternatively, is the mix lock file simple enough that we could patch/modify the lock file directly ourselves? |
|
you could also find outdated one with |
@rarkins the I did a bit of a dive into the I can see two possible courses of action:
|
@rarkins do you know if someone has time to look at it? or started to tackle it? |
No, this is awaiting a community PR |
I have a working version in this branch. I need to fix some tests and see if there are any edge cases for our use cases before creating a PR. @roelandvanbatenburg if you want to try it out that would be helpful. This is the repo I've been working off of https://github.com/pdm-jd/renovate-mix-tests/pulls. These are the PRs created from using the |
@pdm-jd this looks awesome. do you think it's ready for a PR back to renovate? |
it's almost ready to share @jimsynz |
Alright, posted the PR @jimsynz. Can you give it a shot and let me know if it works for you? |
This comment has been minimized.
This comment has been minimized.
@pdm-jd so I just blew up my local Forgejo instance with it and it worked nicely. I now have hundreds of PR's 😂. There were errors wherever the version requirement had an infix operator in it, for example: https://harton.dev/cinder/cinder/pulls/38 Once that's fixed I think this will work flawlessly. |
@jimsynz that's actually an issue with how the existing hex versioning code works. It translates from hex to npm to figure out what the next version is then back to hex. I'll fix it :) |
Actually, I don't know if the simple change I made will actually resolve the issue. I'd prefer it to not block the change. Would you be able to move to versions = ["2.0.0", "2.0.1", "2.1.0", "2.2.5", "3.0.0"]
for version <- versions, do: Elixir.Version.match?(version, ">= 2.0.1 and < 3.0.0")
# [false, true, true, true, false]
for version <- versions, do: Elixir.Version.match?(version, "~> 2.0 and >= 2.0.1")
# [false, true, true, true, false] |
will do. |
I also have a package like this |
This comment was marked as spam.
This comment was marked as spam.
Hi there, Please do not unnecessarily For example, never It's OK to comment in an issue or discussion after multiple days or weeks. But please, still don't Thanks, the Renovate team |
There is nothing to look at because the PR already has unaddressed review comments |
🎉 This issue has been resolved in version 37.405.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
What would you like Renovate to be able to do?
We use ranges in our
mix.exs
and then have specific versions inmix.lock
. We would live renovate to updatemix.lock
when a newer version is available (currently it only updates whenmix.exs
needs to be updated).See #13616 (comment) for more details
If you have any ideas on how this should be implemented, please tell us here.
Something similar to #3108
Is this a feature you are interested in implementing yourself?
Maybe
The text was updated successfully, but these errors were encountered: