-
Notifications
You must be signed in to change notification settings - Fork 321
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
Add support for rebar3 #118
Conversation
Hi, I'm erlang newbie starting a cowboy project with rebar3, this work perfect with
the problem is when running the release $ reba3 release
$ _build/default/rel/ec_api/bin/ec_api console then running |
@sescobb27 Thanks for giving this a whirl. I'm still learning rebar3 so its definitely a bit in development in terms of wanting people to test it out and see if it breaks anything. The first thing I'd try is to make sure that you've set the jiffy dependency branch to "feature-add-rebar3-support" and then remove the override from your application's rebar.config when using this branch. I've got a test repo at [1] that I've just pushed. Jiffy appears to work fine after a |
@sescobb27 Can you try adding this line:
on line 60 in |
in
in mine i got the following
|
This branch works for me on OS X 10.11 with Erlang 18.3. I just used it as a dependency in my rebar3 project. Edit: The compile errors thrown is: and ===> Unable to run pre hooks for 'compile', command 'compile' in namespace 'pc' not found. I am not sure if this is a rebar3 error or something else... |
in https://github.com/davisp/jiffy/pull/118/files#diff-f310c7cc098862c9835f2ba9675a4060R30 i just commented it
and it worked, my project compiles without problems BUT it didn't compile NIF library
In rebar3 it is required to have a Makefile or other instructions for building your C/C++ code outside of rebar itself., I think that is what port_compiler does but it is giving a lot of troubles in linux |
The proper way to do this for |
As far as I'm concerned this is a bug in rebar3/port_compiler then. How can the standard build chain not support building ports and NIFs? Anyway, I'm very much not going to be maintaining oodles of Makefiles across multiple NIF projects I maintain because they screwed things up. If someone has something better than pc, I'm all ears. But I won't be committing Makefiles that require me to tweak things everytime someone with a new os/arch/vm/whatever comes along and needs to use a NIF I wrote. |
sorry to hear that, i know it would be a pain in the ass for you to maintain that, i was looking around in rebar3 documentation and found this, https://www.rebar3.org/docs/custom-compiler-plugins does not know if it could work, if it does maybe, i can try to implement it (as i said before i'm new to erlang but i can give it a try). just let me know 😄 |
The port compiler (pc) should be available via hex.pm without the need to add the github repo.
should work just fine with rebar3. The question is: does that make rebar2 choke when that is in the rebar.config file? If no one answer, I'll fiddle with it and verify. Update: had a chance to look into this and there was one other issue with the test cases that needed sorting out because of the PWD directory differences between |
6fb6b04
to
daad18e
Compare
Hey everyone, I'm taking another crack at getting rebar3 support to work without terribleness for end users. Can anyone give this a try? It seems to work for me with both rebar2 and rebar3. If anyone has any issues let me know. |
Also, FYI, this removes everything about the port compiler plugin, so if you have anything in your overrides to inject the port compiler this may or may not break that. I've gone and replaced the port_compiler with a new tool I hacked together from rebar2 that can be found here: https://github.com/davisp/erlang-native-compiler |
PropEr broke my support for R14. Turns out that EQC Mini is quite usable so I've just switched to that. If EQC Mini exists it will be used, if not the test is skipped gracefully.
Allow Jiffy to be used easily in projects using either rebar 2 or 3.
4e48aab
to
c7756da
Compare
It works for me, but just saying, you shouldn't force push to branches you expect people to clone and test. rebar3 commit locking chokes on that. |
Rejoicing! Thank you very much. |
This should hopefully allow users to use rebar3 to compile jiffy while
also not breaking any project still using rebar2.