-
Notifications
You must be signed in to change notification settings - Fork 167
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
cleanup / faster builds #168
Conversation
de25c54
to
ac78d4a
Compare
I see a lot of effort being put in this PR which, on the surface, seems (to me, at least) completely pointless. Is it possible to provide some motivation and/or description in what you are trying to achieve? (i.e., what is currently wrong/sub-optimal and why it needs fixing.) Thanks. |
The idea is:
At first it was only about the first 2 but progress in #165 brought the 3rd point. |
Let me start with two pieces of advice:
Regarding the motivation of this PR, let's take the first bullet in your list: "dependencies". The only thing that can be considered a "dependency" of PropEr is sfmt-erlang which
Have you ever experienced any issues with dependencies? Regarding the second bullet, what exactly is the problem with Regarding the third bullet: Please do that as part of that (#165) or a separate PR, if it's needed. Please do not misunderstand me. We appreciate contributions. But, like the name of the tool suggests, they have to be PropEr (™). |
Why would sfmt be dropped? Is it a bad RNG? Pushing an empty lockfile may not be super useful, agreed. My point is that maybe it helps to show/ensure that a prod build of PropEr depends on nothing. And it doesn't hurt. I don't think you understand that compile_flags things are actually useless: rebar2 and 3 both support I understand you maintain and package your own version of a fork of rebar2. Any idea why Travis has stopped building this PR? |
Consider adding this patch to the PR to make the tests work again (RNG_SEED needs to be defined correctly, otherwise PropEr does not clean it up afterwards and state_is_clean returns false) diff --git a/include/proper_internal.hrl b/include/proper_internal.hrl
index 9af3a34..bdc41c2 100644
--- a/include/proper_internal.hrl
+++ b/include/proper_internal.hrl
@@ -51,18 +51,20 @@
-ifdef(USE_EXSPLUS).
-define(RNG, rand).
+-define(SEED_NAME, rand_seed).
-define(RNG_SET_SEED(Seed), ?RNG:seed(exsplus,Seed)).
-endif.
-ifdef(USE_SFMT).
-define(RNG, sfmt).
+-defing(SEED_NAME, sfmt_seed).
-endif.
-ifdef(USE_RANDOM).
-define(RNG, random).
+-define(SEED_NAME, random_seed).
-endif.
--define(SEED_NAME, rng_seed).
-ifndef(USE_EXSPLUS).
-define(RNG_SET_SEED(Seed), ?RNG:seed(Seed)).
-endif. (I'm not sure if this belongs in this PR or #165 but only this one contains the relevant code for setting the RNG) Also, I think that at some point (very soon) we can drop |
I think it is worthwhile exploring if updating the build system to, e.g.
Of course that comes with the disadvantage of needing to maintain our own rebar version and packing a compiled But all the things that work right now (no warnings, coverage for only the relevant modules) must also work with the new build system. |
src/proper_gen_next.erl
Outdated
@@ -83,7 +83,7 @@ ensure_initialized() -> | |||
L = [get(proper_gen_next_cache), | |||
get(proper_gen_next_cache_backup), | |||
get(proper_gen_next_depth_cache), | |||
get(rand_seed), | |||
get(rng_seed), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be ?SEED_NAME
My guess is that this PR does not build anymore due to the In any case, I suggest we close this one and possibly continue the discussion(s) on new pull requests that address just one issue at a time. |
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.
Is there something that (still) can be salvaged from this PR, or should I close it? |
No description provided.