Skip to content

Conversation

@kostis
Copy link
Collaborator

@kostis kostis commented Oct 15, 2019

This set of changes allows PropEr to be built using rebar3 instead of
its own (patched) rebar version. Besides being more modern, this
allows for easier integration of PropEr in code bases that use it as
a dependency.

Note that PropEr's version of rebar is still used for running the unit
tests, mainly due to being able to shut off more warnings than when
using rebar3. However, this only affects PropEr developers, not users.

Addresses #204 and a request by propcheck.

Obsoletes #44 and most of #168.

This set of changes allows PropEr to be built using rebar3 instead of
its own (patched) rebar version.  Besides being more modern, this
allows for easier integration of PropEr in code bases that use it as
a dependency.

Note that PropEr's version of rebar is still used for running the unit
tests, mainly due to being able to shut off more warnings than when
using rebar3.  However, this only affects PropEr developers, not users.

Addresses #204 and a request by propcheck.

Obsoletes #44 and most of #168.
@alfert
Copy link

alfert commented Oct 16, 2019

For packaging with hex, following the tutorial (https://www.rebar3.org/docs/publishing-packages),
please add this to app.src (values taken from mix.exs):

     {maintainers, ["Manolis Papadakis", "Eirini Arvaniti", "Kostis Sagonas"]},
     {licenses, ["GPL3"]},
     {link,  [{"GitHub", "https://github.com/proper-testing/proper"}]},

According to https://www.rebar3.org/docs/using-available-plugins#section-hex-package-management the hex plugin for rebar is configured globally for in ~/.config/rebar3/rebar.config:

{plugins, [rebar3_hex]}.

Publishing the package to hex can be done with rebar3 hex publish and rebar3 hex docs.

@kostis, this was the information I grabbed together from rebar docs and the mix file. Shall we put it into a separate PR?

@kostis kostis merged commit 51d2739 into master Oct 16, 2019
@kostis kostis deleted the rebar3-compile branch October 16, 2019 08:06
.eunit
.rebar
rebar3
rebar.lock
Copy link
Contributor

Choose a reason for hiding this comment

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

This file is typically checked in.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Why should it be? PropEr does not have any dependencies, let alone locked ones, and it seems that rebar3 automatically generates this rebar.lock file when run. What I am missing?


dialyzer: .plt/proper_plt compile
dialyzer -n -nn --plt $< -Wunmatched_returns ebin
dialyzer -n -nn --plt $< -Wunmatched_returns _build/default/lib/proper/ebin
Copy link
Contributor

Choose a reason for hiding this comment

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

rebar3 has a dialyzer command that should take care of building the plt and including the correct beams

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I know about the rebar3 dialyzer command but I do not like it. It requires having an installed Erlang/OTP system (which I do not have) in order to find erts as an application to include in the PLT. I prefer calling dialyzer directly, and I do not see the point in not using make for these things. Note that calling Dialyzer and running the tests is for PropEr developers only, not for regular users.

@kostis
Copy link
Collaborator Author

kostis commented Oct 16, 2019

Thanks @TheGeorge for the comments, but note that this PR is already merged. (It's of course possible to improve on it but it needs to happen in another PR.)

We want you to comment on #212 instead :-)

@fenollp fenollp mentioned this pull request Oct 16, 2019
@evnu evnu mentioned this pull request Oct 16, 2019
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 this pull request may close these issues.

4 participants