dnsimple / erldns

DNS server, in Erlang.
MIT License
402 stars 98 forks source link

include lock file and use hex packages where available #90

Closed tsloughter closed 5 years ago

tsloughter commented 5 years ago

I'd like to get this published to hex and this is the first step in that direction. It will require publishing parse_xfrm_utils and dns_erlang first but I thought I'd send this PR with some initial changes needed, and some changes to be more idiomatic rebar3 usage.

tsloughter commented 5 years ago

@aeden I'm not sure which changes are unrelated?

aeden commented 5 years ago

These bits jump out at me:

https://github.com/dnsimple/erldns/pull/90/files#diff-d0d06d8f5a21085d7390330b06d15f8b https://github.com/dnsimple/erldns/pull/90/files#diff-974eee8df153ea55ef883816b18e6d5e removal of test.sh and run.sh

Perhaps I've misunderstood why the changes are necessary though to publish to hex.

Additionally there are changes that may no longer be relevant because master is now on OTP 21.

tsloughter commented 5 years ago

Oh, I see I didn't update my original post about this. All deps have to also be hex dependencies, that is why I removed parse_xfrm_utils which I thought was simpler than getting it published.

The script files could be kept and simply changed I suppose. I figured since skip-deps is no longer needed there wasn't a need for test.sh as the command becomes as simple as rebar3 eunit. But I can add it back.

For run.sh it would be a script that simply runs rebar3 shell.

aeden commented 5 years ago

If you'd like to resolve the conflicts, I can test it out in our environment and make sure that it does not cause any issues for us, and merge it if so.

tsloughter commented 5 years ago

Ok, updated.

Note that I removed get-deps from the makefile. It is not needed and only meant for cases similar to vendoring, like cases that a build requires first fetching dependencies and then compile being run without network access.

tsloughter commented 5 years ago

Side note, it is a bug in rebar3 if make fresh is ever actually needed. rebar3 is meant to be deterministic with dependencies even during upgrades (unlike rebar2) and is will get the correct deps if the lock file changes (like when a developer changes branches and on the new branch a different set of deps is currently used and in the lock file).

aeden commented 5 years ago

Thank you @tsloughter for making this happen, I appreciate it.