Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

Can't publish preprocessor packages due to the transitive Neotoma dependency #186

Open
pepicrft opened this issue Aug 20, 2022 · 7 comments

Comments

@pepicrft
Copy link

First of all, thanks for this great project. I'm new to the Elixir ecosystem and Still was one of the first tools I played with. I've implemented a pre-processor to support .scss style files, but I can't push it to the Hex package registry due to the following error:

** (Mix) Can't build package with overridden dependency neotoma, remove `override: true`

Which happens because I had include the neotoma dependency in the deps function of my project to force Mix to use rebar3:

{:neotoma, "~> 1.7", manager: :rebar3, override: true}

Removing it leads to this other error due to dependency incompatibilities:

Unchecked dependencies for environment dev:
* neotoma (Hex package)
  the dependency neotoma in mix.exs is overriding a child dependency:

  > In mix.exs:
    {:neotoma, "~> 1.7", [env: :prod, repo: "hexpm", hex: "neotoma"]}

  > In deps/slime/mix.exs:
    {:neotoma, "~> 1.7", [env: :prod, hex: "neotoma", repo: "hexpm", optional: false]}

  Ensure they match or specify one of the above in your deps and set "override: true"

Am I right understanding that a solution to this problem comes down to configuring the neotoma dependency to build with rebar3?

Thanks in advance

@gabrielpoca
Copy link
Member

@pepicrft yeah, I'm having the same issue with the latest versions of elixir/erlang. I still need to debug and fix this issue, but you can use the same version we are using to develop:

elixir 1.11.3-otp-23
erlang 23.2.3

Those should work. I'll keep you updated here.

@pepicrft
Copy link
Author

@gabrielpoca thanks a lot for your suggestion. I'll go ahead with it and subscribe to this issue.

@pepicrft
Copy link
Author

I tried with the suggested versions. This is what I get when I run elixir --version:

Erlang/OTP 23 [erts-11.1.7] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1]
Elixir 1.11.3 (compiled with Erlang/OTP 23)

However, I'm still getting the error:

Unchecked dependencies for environment dev:
* neotoma (Hex package)
  the dependency neotoma in mix.exs is overriding a child dependency:

  > In mix.exs:
    {:neotoma, "~> 1.7", [env: :prod, repo: "hexpm", hex: "neotoma"]}

  > In deps/slime/mix.exs:
    {:neotoma, "~> 1.7", [env: :prod, hex: "neotoma", repo: "hexpm", optional: false]}

  Ensure they match or specify one of the above in your deps and set "override: true"
** (Mix) Can't continue due to errors on dependencies

Am I missing anything?
Thanks @gabrielpoca

@gabrielpoca
Copy link
Member

@pepicrft I was looking into it, and it seems there's a fix for it slime-lang/slime#170 (comment) can you try it out? Just adding {:neotoma, "~> 1.7.3", manager: :rebar3, override: true} was enough to make the error disappear on my system

@pepicrft
Copy link
Author

pepicrft commented Aug 31, 2022

:/ No luck. I get the following error:

** (Mix) Can't build package with overridden dependency neotoma, remove `override: true`

I think the trick works when doing development, but the publishing of the package expects packages not to have the override: true flag.

@gabrielpoca
Copy link
Member

@pepicrft I'm sorry, l lost the notification. I was trying to understand how slime and phoenix_slime were publishing packages since they have the same dependency, but it seems that those packages haven't been updated for a long time. They will have the same issue once they release a new version. I also found your comment in the forum, but no answer 😞 For now, I think you should keep it in Github, you can use it directly in your mix.exs. I hope this weird issue is not preventing you from investing in Elixir more 💪

@pepicrft
Copy link
Author

Hey @gabrielpoca
Thanks a lot for your answer. I appreciate a lot that you took the time to figure out a way to overcome the issue. I doubt this hiccup will impact my diving into the language. I'm liking it a lot indeed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants