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

r3: simplify build #173

Merged
merged 1 commit into from
Jun 26, 2018
Merged

r3: simplify build #173

merged 1 commit into from
Jun 26, 2018

Conversation

fenollp
Copy link
Contributor

@fenollp fenollp commented Jun 17, 2018

This is the build system simplification extracted from #168
It makes use of the rebar platform_define to not require writing an HRL to the filesystem. This option is supported by rebar, rebar3 and the custom patched rebar that is bundled in this repo.

The idea is to simplify/standardize the build process so that one day a custom patched rebar would not need to be part of this repo as well as making development easier long term for contributors that use rebar3.

@codecov-io
Copy link

codecov-io commented Jun 17, 2018

Codecov Report

Merging #173 into master will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #173      +/-   ##
==========================================
+ Coverage   82.09%   82.12%   +0.02%     
==========================================
  Files          13       13              
  Lines        3150     3149       -1     
==========================================
  Hits         2586     2586              
+ Misses        564      563       -1
Impacted Files Coverage Δ
src/proper_statem.erl 90.98% <0%> (-2.15%) ⬇️
src/proper_arith.erl 85.43% <0%> (ø) ⬆️
src/proper_typeserver.erl 72.73% <0%> (+0.11%) ⬆️
src/proper.erl 82.94% <0%> (+0.46%) ⬆️
src/proper_gen.erl 83.82% <0%> (+0.89%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 070622b...95fde2e. Read the comment docs.

mix.exs Outdated
@@ -22,7 +22,7 @@ defmodule Proper.Mixfile do
end

defp package do
[files: ~w(src include rebar.config configure Makefile COPYING README.md THANKS check_escripts.sh clean_doc.sh clean_temp.sh write_compile_flags mix.exs),
[files: ~w(src include rebar.config configure Makefile COPYING README.md THANKS check_escripts.sh clean_doc.sh clean_temp.sh flags mix.exs),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure what the flags file is. Can you elaborate?

rebar.config Outdated
@@ -35,9 +37,22 @@
{erl_opts, [debug_info,
report_warnings, {warn_format,1}, warn_export_vars,
warn_obsolete_guard, warn_unused_import,
warn_missing_spec, warn_untyped_record]}.
warn_missing_spec, warn_untyped_record,
warn_unused_vars,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I thought that warn_unused_vars was on by default... Do you have evidence to the contrary?

rebar.config Outdated

{dialyzer, [{warnings, [unmatched_returns
]}
,{plt_extra_apps, [erts, kernel, stdlib, compiler, crypto, syntax_tools]}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please follow the style of the rest of the file.

rebar.config Outdated
,{plt_extra_apps, [erts, kernel, stdlib, compiler, crypto, syntax_tools]}
]}.

{profiles, [{test, [{erl_opts, [nowarn_missing_spec
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are these nowarn_ options present here? They should not really be, since this PR is still using (our patched version of) rebar, isn't it?

Copy link
Contributor Author

@fenollp fenollp Jun 17, 2018

Choose a reason for hiding this comment

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

This is rebar3-specific and clears great many a warnings when running test.
You can see that removing the option and running rebar3 eunit is quite harsh.

Copy link
Collaborator

Choose a reason for hiding this comment

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

No, I do not want to see that. Instead, I want to see a pull request that does one thing, and one thing only, and does it right. This one is titled "Simplify build". Let's have that.

@kostis
Copy link
Collaborator

kostis commented Jun 19, 2018

Please, do not include in this PR changes which are rebar3-specific, if you actually want it merged. I've made this point before but apparently it did not get across. I hope it does now.

We want PRs that do one thing only and do that thing well. This is supposed to be a pull request that simplifies the build system. If you want to also substitute rebar with rebar3 please open a new pull request.

@fenollp
Copy link
Contributor Author

fenollp commented Jun 26, 2018

Last commit has been removed. This looks ready to me ;)

@kostis
Copy link
Collaborator

kostis commented Jun 26, 2018

Last commit has been removed. This looks ready to me ;)

Not to me though. I still do not understand why the entry

{profiles, [{test, [{erl_opts, [nowarn_missing_spec
 ...

appears in rebar.config.

According to your comment, this is rebar3-specific. So it should also be removed.

@fenollp
Copy link
Contributor Author

fenollp commented Jun 26, 2018

Right. Just patched & squashed.

@kostis kostis merged commit a0f7aeb into proper-testing:master Jun 26, 2018
@fenollp fenollp deleted the r3 branch June 26, 2018 15:15
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.

3 participants