Skip to content
This repository has been archived by the owner on May 12, 2018. It is now read-only.

Check C source dependencies in needs_compile #293

Merged
merged 2 commits into from
Sep 11, 2014
Merged

Conversation

liskin
Copy link
Contributor

@liskin liskin commented Jun 10, 2014

This makes rebar recompile/relink port drivers properly when only C headers change.

I tested this on Linux with gcc, I'm not sure whether this is portable.

@ghost
Copy link

ghost commented Jun 10, 2014

Thanks @liskin.

We cannot use the binary module as the minimum Erlang/OTP version required by rebar is R13B03.

Same as you, I'm also not sure about MSVC compatibility (see rebar_port_compiler:default_env/0).

@liskin
Copy link
Contributor Author

liskin commented Jun 10, 2014

Oh, okay, I'll try to rewrite the parsing to use something else, although I wonder if there's an easy way to get such old Erlang. If you happen to know anything easier than lxc container and snapshot.debian.org, let me know. :-)

As I didn't modify the templates for win32, no .d files will be generated there and header deps will simply be ignored. That may or may not be considered a bug. :-)

@ghost
Copy link

ghost commented Jun 10, 2014

@liskin wrote:

Oh, okay, I'll try to rewrite the parsing to use something else, although I wonder if there's an easy way to get such old Erlang. If you happen to know anything easier than lxc container and snapshot.debian.org, let me know. :-)

I can't suggest anything easier than that or switching between locally built versions in your shell environment.

As I didn't modify the templates for win32, no .d files will be generated there and header deps will simply be ignored. That may or may not be considered a bug. :-)

That sounds okay to me, but we may want to add a NOTE comment explaining that this is not supported with MSVC.

@tsloughter
Copy link
Member

I'm going to be that guy again and propose dropping R13 support :)

@ghost
Copy link

ghost commented Jun 15, 2014

@tsloughter wrote:

I'm going to be that guy again and propose dropping R13 support :)

The maintenance burden to support R13B03 is minimal, but the advantage is important. A rebar binary built with R13 or R14 works with any otp version from R13 up to 17. This helps ensure rebar to be a portable stand-alone binary.

@liskin
Copy link
Contributor Author

liskin commented Jun 15, 2014

So, there are some tests and a NOTE about win32 and I replaced binary:split with re:split, so it should work on R13, although I didn't manage to actually try. Why don't we have R13 builds in Travis?

@ferd
Copy link
Contributor

ferd commented Jun 15, 2014

@liskin regarding R13 and Travis, this is being covered in #295

].

run(_Dir) ->
% wait a bit for new files to have different timestamps
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and the other comment lines should use %% instead.

@ghost
Copy link

ghost commented Jul 25, 2014

We can fix the style issues in inttest/port/port_rt.erl in a follow-up patch. So, is there anything holding up a merge?

@ghost
Copy link

ghost commented Sep 11, 2014

ping?

ferd added a commit that referenced this pull request Sep 11, 2014
Check C source dependencies in needs_compile
@ferd ferd merged commit d5e3b43 into rebar:master Sep 11, 2014
ferd added a commit that referenced this pull request Sep 11, 2014
@tonyrog
Copy link
Contributor

tonyrog commented Jan 12, 2015

Wonderful!
Mega thanks for this fix :-)
This is good progress!

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

Successfully merging this pull request may close these issues.

4 participants