-
Notifications
You must be signed in to change notification settings - Fork 521
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
A dep installed with a higher minimum_otp_version than used currently can never be upgraded #2938
Comments
I don't like that feature. Your best workaround in the short term is to rely on overrides:
and then see if it works. I don't think we can easily fix the dep check, because it gets checked at file scan time when the code runs, before any upgrade processing actually happens. A workaround based on that is something like delete the dep (unfetch it) and then do the upgrade. |
So, wouldn't it be possible to automatically add an override that dels this minimum_otp_vsn on I can understand the min-requirement for targets like compile, ct, xref etc, but not for targets like upgrade, clean and so forth. |
Unfortunately, not the way things are currently structured. Basically, the version check happens in three places:
Rebar3 tasks are all "independent", but can specify their dependencies. For example, the The So when Rebar3 is asked to run The So basically, the reason this is messy is that the entire structure of how Rebar3 dispatches tasks makes it really difficult to special-case scenarios like this. The only way I can think of doing that would be to uplift the task-definition framework we use to allow passing in an option for "forced configs" at creation time, do some kind of tricky lookahead in tasks being run before they happen to force the application early and hope that it applies properly, but it could still be overridden by other intermediary tasks. |
How to reproduce.
{minimum_otp_vsn, "27"}.
rebar3 upgrade mydep
===> OTP release 27 or later is required by mydep. Version in use: 25.3.2.8
{minimum_otp_vsn, "25"}.
-
rebar3 upgrade mydep
Expected behavior
mydep is updated and can now compile with otp 25
Actual behavior
mydep can't be upgraded.
===> OTP release 27 or later is required by mydep. Version in use: 25.3.2.8
The text was updated successfully, but these errors were encountered: