-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Mix manager should set git versioning git dependencies #31778
Replies: 3 comments · 8 replies
-
Hi there, Get your discussion fixed faster by creating a minimal reproduction. This means a repository dedicated to reproducing this issue with the minimal dependencies and config possible. Before we start working on your issue we need to know exactly what's causing the current behavior. A minimal reproduction helps us with this. Discussions without reproductions are less likely to be converted to Issues. Please follow these steps:
If you need help with running renovate on your minimal reproduction repository, please refer to our Running Renovate guide. The Renovate team |
Beta Was this translation helpful? Give feedback.
All reactions
-
@rarkins please lemme know if there is something else I am missing. |
Beta Was this translation helpful? Give feedback.
All reactions
-
We have explanations of minimal in the linked docs |
Beta Was this translation helpful? Give feedback.
All reactions
-
Changing your config needs you to rerun the bot too. Easier if you install the hosted bot so that it's done automatically |
Beta Was this translation helpful? Give feedback.
All reactions
-
Ok, I installed the cloud bot. I am not sure, if the cloud version is good for replication since I am unable to control the version of renovation it runs and since I've discovered this problem with the self-hosted version it made sense to me to replicate with the same version. Logs
|
Beta Was this translation helpful? Give feedback.
All reactions
-
The goal of a minimal reproduction is to eliminate local factors / environmental problems. If a problem doesn't reproduce in public then it means it's a problem with your environment, but I don't think that's the case here. |
Beta Was this translation helpful? Give feedback.
All reactions
-
It seems to reproduce, but now needs dependencies reduced to minimal. The other dependencies don't appear to be necessary |
Beta Was this translation helpful? Give feedback.
All reactions
-
I can also confirm that I also experience this. This fix would be super beneficial! |
Beta Was this translation helpful? Give feedback.
-
What would you like help with?
I think I found a bug
How are you running Renovate?
Self-hosted
If you're self-hosting Renovate, tell us which platform (GitHub, GitLab, etc) and which version of Renovate.
Gituhb 38.101.1
Please tell us more about your question or problem
This is a follow-up on Bad Tag name for git dependencies in Elixir project.
Problem
It looks like the
mix
manager handles git dependencies incorrectly and when"datasource": "git-tags", "versioning": "hex"
renovate runs the hex versioning and reaches this linerenovate/lib/modules/versioning/hex/index.ts
Line 104 in 8b2d1fa
As far as I understand mix does not support version ranges for git dependencies. And it looks like the
extract.ts
implementation is completely wrong.Eg.
ref:
can be a tag, branch or digest. But the current implementation treats it as digest and replaces tag with SHA which is probably not the desired solution.It produces an invalid newVersion from
v.0.1
->== v0.2
which fails to download the tag (because it does not exist) andmix deps.update
fails.Fix proposal
I think the fix can follow the logic of the existing Poetry manager, where it sets versioning to
semver
in case the dependency is a type ofsemver
renovate/lib/modules/manager/poetry/schema.ts
Lines 133 to 135 in 8b2d1fa
Here are the use cases the mix manager should cover
After doing more tests, it turns out the
mix.exs
file changes in an unexpected way, and for some reasonmix.lock
is not changed at allhttps://github.com/jans-forks/renovate-reporoduction-31778/pull/3/files
I've made some modifications to the code and achieved this.
https://github.com/jans-forks/renovate-playground/compare/main..e5f0dce01dd3b321dd3d2e46c7bf09605cead7ed
I am still not sure about the desired behaviour for
branch
where renovate has changedref: branch-name
->ref: SHA1
, but I think this should only happen in a lock file not themix.exs
.Besides the logic fix, I propose to update the docs page https://docs.renovatebot.com/modules/manager/mix/
To mention that git dependencies may require manager process may require extra git credentials. Which I achieved with customenvvariables.
Reproduction repo
Logs (if relevant)
Logs
Beta Was this translation helpful? Give feedback.
All reactions