slime icon indicating copy to clipboard operation
slime copied to clipboard

Unmaintained neotoma uses rebar2

Open Sgoettschkes opened this issue 2 years ago • 9 comments

When using slime (in the context of the still static page generator), I get the following error message:

dependency :neotoma is using Rebar 2, which is no longer maintained and no longer works in recent Erlang/OTP versions. Remove the :manager option or set it to :rebar3 instead

neotoma seems to be unmaintained with the last commit to master in 2016.

I guess the options to go forward would be:

  1. Fork neotoma and update it
  2. Replace neotoma with something else

Sgoettschkes avatar Apr 11 '22 14:04 Sgoettschkes

I found a fork that may resolve this but don't have time to test it yet. Check https://github.com/xio/neotoma.

Sinc63 avatar Apr 13 '22 14:04 Sinc63

You can also override neotoma dependency right from your mix file:

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

cblavier avatar Apr 14 '22 12:04 cblavier

@cblavier - this doesn't seem to work. At least with Erlang/OTP 25…

silverdr avatar May 22 '22 23:05 silverdr

@cblavier - this doesn't seem to work. At least with Erlang/OTP 25…

the following has worked for me as a quick fix:

{:neotoma, git: "https://github.com/xio/neotoma", override: true},
{:phoenix_slime, git: "https://github.com/Raphexion/phoenix_slime.git", branch: "master"}

latesh avatar May 23 '22 10:05 latesh

@cblavier - this doesn't seem to work. At least with Erlang/OTP 25…

the following has worked for me as a quick fix:

{:neotoma, git: "https://github.com/xio/neotoma", override: true},
{:phoenix_slime, git: "https://github.com/Raphexion/phoenix_slime.git", branch: "master"}

For OTP 24 the fix suggested by @cblavier was fine. For OTP 25 neither his nor the one from @latesh seems to work anymore as now Rebar is not "OTP 25 compiled". I get

=ERROR REPORT==== 23-May-2022::19:12:50.195973 ===
beam/beam_load.c(551): Error loading function rebar3:parse_args/1: op put_tuple u x:
  please re-compile this module with an Erlang/OTP 25 compiler

escript: exception error: undefined function rebar3:main/1
  in function  escript:run/2 (escript.erl, line 750)
  in call from escript:start/1 (escript.erl, line 277)
  in call from init:start_em/1
  in call from init:do_boot/3

silverdr avatar May 23 '22 19:05 silverdr

OK, so the current "quick fix" for OTP 25 is:

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

followed by mix local.rebar, which deals with the above mentioned error.

silverdr avatar May 24 '22 19:05 silverdr

The trick worked for me too, but I'm using it from a package that I'd like to publish in the Hex registry, and this prevents me from doing it. Newbie question, is it possible to configure Neotoma to be built using rebar3 so that it doesn't require upstream packages to do overrides?

pepicrft avatar Aug 20 '22 06:08 pepicrft

The trick worked for me too, but I'm using it from a package that I'd like to publish in the Hex registry, and this prevents me from doing it. Newbie question, is it possible to configure Neotoma to be built using rebar3 so that it doesn't require upstream packages to do overrides?

I haven't done this sort of thing, but I would hope that if you set your mix file to use rebar3 as an override, that packages that include you as a dependency will inherit that override. You may have to create a temporary test package that imports your main package to see if it works. And let us know, either way.

Sinc63 avatar Sep 01 '22 02:09 Sinc63

FYI - found forks working with PHX 1.7

https://github.com/populimited/slime https://github.com/populimited/phoenix_slime

silverdr avatar Aug 09 '23 21:08 silverdr