Skip to content
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

Missing dependency converged error for overridden hex dependency in umbrella #13490

Closed
ericmj opened this issue Apr 9, 2024 · 1 comment · Fixed by #13493
Closed

Missing dependency converged error for overridden hex dependency in umbrella #13490

ericmj opened this issue Apr 9, 2024 · 1 comment · Fixed by #13493

Comments

@ericmj
Copy link
Member

ericmj commented Apr 9, 2024

Elixir and Erlang/OTP versions

Erlang/OTP 26 [erts-14.2.2] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit]

Elixir 1.17.0-dev (100d63b) (compiled with Erlang/OTP 26)

mix hex.info:
Hex: 2.0.7-dev
Elixir: 1.17.0-dev
OTP: 26.2.2

Built with: Elixir 1.17.0-dev and OTP 26.2.2

Operating system

macOS

Current behavior

This issue was originally reported here: hexpm/hex#1010.

Given the dependency tree:

app_b (umbrella child)
  app_a (umbrella child)
    timex (hex)
      tzdata (hex)
  timex (hex)
    tzdata (hex)
  tzdata (git, override)
app_c (umbrella child)
  timex (hex)
    tzdata (hex)

The following error is raised:

* Updating tzdata (Hex package)
** (Mix) The lock is missing for package tzdata. This could be because another package has configured the application name for the dependency incorrectly. Verify with the maintainer of the parent application

Here is a repo that reproduces the error https://github.com/ericmj/umbrella_override_issue. Please use latest hex from the main branch as it has other fixes for umbrella apps.

Expected behavior

This error happens because hex does not add tzdata to the lock as it sees it as overridden, this may be incorrect behavior and should be investigated in hex. But in this case it should not matter since mix should detect that the dependencies are diverged since tzdata is not overridden all umbrella children.

@ericmj
Copy link
Member Author

ericmj commented Apr 9, 2024

Another example of this issue can be found here hexpm/hex#1019 (comment) with another reproducing repo: https://github.com/khustochka/floki_test2_umbrella.

In this case mix does not detect the diverged {:floki, ">= 0.30.0", only: :test} from the umbrella child app and {:floki, "~> 0.36"} from phoenix_live_view. The error only happens when passing --only prod to mix deps.get.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

1 participant