Compilation issue with 2.33.2 and erlang 27.0
Closed this issue · 5 comments
Came across this error when running mix test
after upgrading ex_cldr:
==> ex_cldr_numbers
Compiling 4 files (.erl)
src/decimal_formats_lexer.erl:753:38: syntax error before:
% 753| yystate(0, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 40 ->
% | ^
/Users/me/.local/share/mise/installs/erlang/27.0/lib/parsetools-2.6/include/leexinc.hrl:43:39: function yyaction/5 undefined
% 43| string_cont(Tcs1, L2, C2, yyaction(A, Alen, Tcs, L0,C0), Ts)
% | ^
/Users/me/.local/share/mise/installs/erlang/27.0/lib/parsetools-2.6/include/leexinc.hrl:46:39: function yyaction/5 undefined
% 46| %% string_cont(RestChars, Line, Col, Token, Tokens)
% | ^
/Users/me/.local/share/mise/installs/erlang/27.0/lib/parsetools-2.6/include/leexinc.hrl:53:39: function yyaction/5 undefined
% 53| do_string(Rest, Line, Col, Rest, [T|Ts]);
% | ^
/Users/me/.local/share/mise/installs/erlang/27.0/lib/parsetools-2.6/include/leexinc.hrl:116:38: function yyaction/5 undefined
% 116| Tcs1 = yysuf(Tcs, Alen1),
% | ^
/Users/me/.local/share/mise/installs/erlang/27.0/lib/parsetools-2.6/include/leexinc.hrl:122:38: function yyaction/5 undefined
% 122| %% token_cont(RestChars, Line, Col, Token)
% | ^
/Users/me/.local/share/mise/installs/erlang/27.0/lib/parsetools-2.6/include/leexinc.hrl:141:38: function yyaction/5 undefined
% 141| NewRest = Push ++ Rest,
% | ^^^^^^^^^^^
/Users/me/.local/share/mise/installs/erlang/27.0/lib/parsetools-2.6/include/leexinc.hrl:206:39: function yyaction/5 undefined
% 206| %% just continue.
% | ^^^^^^^^^^^^^^^^^^^^^^
/Users/me/.local/share/mise/installs/erlang/27.0/lib/parsetools-2.6/include/leexinc.hrl:212:39: function yyaction/5 undefined
% 212| tokens_cont(Rest, Line, Col, {token,T,Push}, Ts) ->
% | ^
/Users/me/.local/share/mise/installs/erlang/27.0/lib/parsetools-2.6/include/leexinc.hrl:230:21: function yyaction/5 undefined
% 230|
% | ^^^^^^^^^^^^^^^^^^^^^
/Users/me/.local/share/mise/installs/erlang/27.0/lib/parsetools-2.6/include/leexinc.hrl:275:37: function yyaction/5 undefined
% 275| skip_cont(Rest, Line, Col, skip_token, Error) ->
% | ^
/Users/me/.local/share/mise/installs/erlang/27.0/lib/parsetools-2.6/include/leexinc.hrl:279:37: function yyaction/5 undefined
% 279| skip_tokens(yystate(), NewRest, Line, Col, NewRest, 0, Line, Col, Error, reject, 0);
% | ^
/Users/me/.local/share/mise/installs/erlang/27.0/lib/parsetools-2.6/include/leexinc.hrl:287:21: function yyaction/5 undefined
% 287| yypre(List, N) -> lists:sublist(List, N).
% | ^
src/decimal_formats_lexer.xrl:34:1: Warning: function currency_symbol/1 is unused
% 34| currency_symbol(Len) ->
% | ^
could not compile dependency :ex_cldr_numbers, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile ex_cldr_numbers --force", update it with "mix deps.update ex_cldr_numbers" or clean it with "mix deps.clean ex_cldr_numbers"
Downgrading to "<= 2.33.1" made the issue go away...
Based upon the trace above, it looks you might be caching the *.erl
files generated by leex
and yecc
? I would expect to see compilation of the src/decimal_formats_lexer.xrl
to its *.erl
first. There were, as I recall, some changes to OTPs parsetools
in OTP 27.
Any chance that might align with you see? I have no issues compiling the ex_cldr_numbers
on OTP 27 so if that's not the issue I'm at a bit of a loss. The errors your reference are in code generated by OTP so version mismatch is all I can think of for now.
Yeah wonder where those files are cached, because what's odd is after first seeing it I upgraded to 27.0.1 and deleted my ./_build but the paths in the error still reference 27.0...
Yeah tried again (updating to latest version) and mysterious error disappeared mysteriously 👍