slime icon indicating copy to clipboard operation
slime copied to clipboard

Add neotoma to extra_applications for elixir 1.15 compatibility

Open liamwhite opened this issue 2 years ago • 2 comments

Needed to avoid a compilation failure with 1.15

** (UndefinedFunctionError) function :neotoma.file/2 is undefined (module :neotoma is not available)
    (neotoma 1.7.3) :neotoma.file(~c"/tmp/slime/src/slime_parser.peg", [transform_module: :slime_parser_transform])
    tasks/compile.peg.exs:37: Mix.Tasks.Compile.Peg.compile_grammar/2
    (mix 1.15.4) lib/mix/task.ex:447: anonymous fn/3 in Mix.Task.run_task/5
    (mix 1.15.4) lib/mix/tasks/compile.all.ex:124: Mix.Tasks.Compile.All.run_compiler/2
    (mix 1.15.4) lib/mix/tasks/compile.all.ex:104: Mix.Tasks.Compile.All.compile/4
    (mix 1.15.4) lib/mix/tasks/compile.all.ex:93: Mix.Tasks.Compile.All.with_logger_app/2
    (mix 1.15.4) lib/mix/tasks/compile.all.ex:56: Mix.Tasks.Compile.All.run/1
    (mix 1.15.4) lib/mix/task.ex:447: anonymous fn/3 in Mix.Task.run_task/5

liamwhite avatar Sep 27 '23 17:09 liamwhite

Hi @liamwhite

I'm using your fork with Elixir >= 1.15 and it solves the neotoma missing module problem.

But, I get this warning:

both :extra_applications and :applications was found in your mix.exs. You most likely want to remove the :applications key, as all applications are derived from your dependencies

So, I believe the change should be:

  def application do
    [
-     applications: [:eex]
+     extra_applications: [:eex, :neotoma]
    ]
  end

joeyates avatar Feb 16 '24 14:02 joeyates

I would really appreciate if this (or a similar PR) was merged as slime is a dependency of a library that I maintain and I cannot release it (for Elixir >- 1.15) without this change.

Any chance of getting this merged and released?

joeyates avatar Feb 29 '24 08:02 joeyates

For anyone else who might need Elixir >= 1.15 compatibility, I've released my fork as jgy_slime.

I'll discontinue the fork as/when this gets merged, of course :)

joeyates avatar Jun 07 '24 09:06 joeyates

@joeyates do you mind creating a PR upgrading the package to Elixir >= 1.15

yordis avatar Jun 07 '24 14:06 yordis

Hi @yordis

I believe this PR has this covered.

@liamwhite 's update to this PR on March 4th uses :extra_applications exclusively, which I think is the correct approach.

joeyates avatar Jun 07 '24 15:06 joeyates