Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work with OTP 27; dependencies can't compile #283

Closed
backerman opened this issue Oct 3, 2024 · 3 comments · Fixed by #286
Closed

Doesn't work with OTP 27; dependencies can't compile #283

backerman opened this issue Oct 3, 2024 · 3 comments · Fixed by #286

Comments

@backerman
Copy link

Mochiweb fails to compile:

erlc +debug_info -o deps/mochiweb/ebin -Ideps/mochiweb/include -Ideps/mochiweb/src deps/mochiweb/src/*.erl
deps/mochiweb/src/mochinum.erl:47:8: Warning: matching on the float 0.0 will no longer also match -0.0 in OTP 27.
If you specifically intend to match 0.0 alone, write +0.0 instead.
%   47| digits(0.0) ->
%     |        ^

deps/mochiweb/src/mochiweb_multipart.erl:278:13: syntax error before: ','
%  278|       {maybe, Start} ->
%     |             ^

deps/mochiweb/src/mochiweb_multipart.erl:331:9: syntax error before: ','
%  331| 		{maybe, Skip};
%     | 		      ^

So either Mochiweb needs to be updated or the compilation can include a patch to backport the fixes for maybe. I don't know what's involved in upgrading to Mochiweb 3.

@1256-bits
Copy link

1256-bits commented Oct 27, 2024

I just manually cloned mochiweb to ./deps and manually built it.
You might also need to manually edit mochiweb's makefile to use the correct executable name for rebar.
A pretty shitty workaround, but at least it works.

Update: instead of cloning mochiweb manually I just needed to remove && $(GIT) checkout --detach 835b107a4da4550080d032623ff6ae9a18d02c37 in deps/mochiweb/src: section of the makefile to unpin it. This also solves the incorrect rebar name somehow.

Update 2: Some (rather important) functionality appears to be broken because of changes in mochiweb. It looks like the only way to get it to work again is to switch to the older version of OTP until someone can actually fix it.

@sebastiw
Copy link
Owner

I've started an effort of removing mochiweb as dependency, but it is not as easy as both elisp + erlang code need some communication format (currently json). OTP 27 introduces the new json module, but edts aims to support older versions as well.

I'll have a more proper look later this week at what is left.

@sebastiw
Copy link
Owner

sebastiw commented Dec 1, 2024

I've seen that mochiweb is finally updated for later OTP versions, so I'm working on fix (actually working on the test cases), and hopefully will finish it up today.

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

Successfully merging a pull request may close this issue.

3 participants