narrowtux / abacus

Parses and evaluates mathematical expressions in Elixir. Inspired by math.js
MIT License
84 stars 18 forks source link

Add support to elixir 1.17 and OTP 27 #27

Closed MrYawe closed 3 weeks ago

MrYawe commented 1 month ago

This should fix the error below and several other warnings.

warning: in order to compile .yrl files, you must add "compilers: [:yecc] ++ Mix.compilers()" to the "def project" section of abacus's mix.exs
  (mix 1.17.0-rc.0) lib/mix/tasks/compile.yecc.ex:70: Mix.Tasks.Compile.Yecc.preload/1
  (mix 1.17.0-rc.0) lib/mix/compilers/erlang.ex:66: Mix.Compilers.Erlang.compile/6
  (mix 1.17.0-rc.0) lib/mix/task.ex:495: anonymous fn/3 in Mix.Task.run_task/5
  (mix 1.17.0-rc.0) lib/mix/tasks/compile.all.ex:108: Mix.Tasks.Compile.All.run_compiler/2
  (mix 1.17.0-rc.0) lib/mix/tasks/compile.all.ex:88: Mix.Tasks.Compile.All.compile/4
  (mix 1.17.0-rc.0) lib/mix/tasks/compile.all.ex:62: Mix.Tasks.Compile.All.run/1

warning: in order to compile .xrl files, you must add "compilers: [:leex] ++ Mix.compilers()" to the "def project" section of abacus's mix.exs
  (mix 1.17.0-rc.0) lib/mix/tasks/compile.leex.ex:69: Mix.Tasks.Compile.Leex.preload/1
  (mix 1.17.0-rc.0) lib/mix/compilers/erlang.ex:66: Mix.Compilers.Erlang.compile/6
  (mix 1.17.0-rc.0) lib/mix/task.ex:495: anonymous fn/3 in Mix.Task.run_task/5
  (mix 1.17.0-rc.0) lib/mix/tasks/compile.all.ex:108: Mix.Tasks.Compile.All.run_compiler/2
  (mix 1.17.0-rc.0) lib/mix/tasks/compile.all.ex:88: Mix.Tasks.Compile.All.compile/4
  (mix 1.17.0-rc.0) lib/mix/tasks/compile.all.ex:62: Mix.Tasks.Compile.All.run/1

==> abacus
Compiling 3 files (.erl)
src/new_parser.yrl:54:7: syntax error before: 'else'
%   54|       {'else', '$5'}
%     |       ^

src/new_parser.erl:819:13: function yeccpars2_46_/1 undefined
%  819|  NewStack = yeccpars2_46_(Stack),
%     |             ^

src/new_parser.yrl:71:2: inlined function yeccpars2_46_/1 undefined
%   71| expr -> expr '/' expr : {'/', [], ['$1', '$3']}.
%     |  ^

could not compile dependency :abacus, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile abacus --force", update it with "mix deps.update abacus" or clean it with "mix deps.clean abacus"
narrowtux commented 3 weeks ago

I have released 2.1.0 with these changes (and updates to ex_doc)