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

Update the installation steps of the README #269

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pablocostass
Copy link
Contributor

Resolves #268.

I took the chance to, besides adding a note to what is the default path where PropEr will be installed with brew, add a small section on how to add it as a dependency for Erlang and Elixir projects (with rebar3 and mix, respectively), as many people probably want to do that nowadays.

@kostis
Copy link
Collaborator

kostis commented May 11, 2021

Thanks for your PR @pablocostass !

I have some concerns about it. On the one hand, I can definitely see its usefulness, esp. for newcomers. On the other hand, I am not sure it's a good idea to have 1.3.0 or 1.3 hard-coded in three places (and remember to update these with each new release). More importantly, I am a bit uneasy about including instructions that depend on other tools (rebar3, mix, brew) and may change without notice. I would prefer to point to a place in these tools on how to do something (e.g. look at this rebar3 page, use brew info proper, etc.) instead of including information that may become obsolete and thus confusing.

Is there something along these lines that can be done about it?

@pablocostass
Copy link
Contributor Author

I do understand the point of having the version hard-coded not once but thrice in the README. Sadly, as far as I have seen, most Erlang/Elixir projects just update those values with each release, but I am not the person responsible for that and it can be a pain in the ass for others.

However, another approach that I have seen, mainly in Erlang projects, is to just add a badge that points to the hex.pm page of the project, e.g.,

Hex pm <-- for PropEr

and that certainly is an easy solution that both reduces the number of hardcodes related to the version (the badge doesn't even need it) and allows us to remove the instructions on how to add PropEr as a dependency for these tools. What do you think @kostis?

On a side note, all the tools that would be mentioned in the README with this PR (rebar3, mix, brew) are already very mature and well-established; how to add a dependency in the first two or what is the default installation path of the latter is not something that could become obsolete easily nowadays.

@kostis
Copy link
Collaborator

kostis commented May 11, 2021

I am all for adding a badge to hex.pm. Let me do this right away (and you modify this PR appropriately).

As to the tools, I agree that they are very mature alright (and thus not very likely to change), but I still prefer a pointer in their manual (e.g. "read the section ...... about PropEr in rebar3") or a sentence of the form "use the command brew info proper to find out where PropEr is installed and then use that dir for setting ERL_LIBS as follows ....".

@xspirus
Copy link
Contributor

xspirus commented May 11, 2021

Barging in a bit unexpectedly here, @kostis and @pablocostass I had made some changes to the README a while ago, but never got a chance to create a PR. You can check the changes here, where I think it's better to also show how to use proper from github directly, or using it only for test profiles.

Let me know what you think 😄

@pablocostass
Copy link
Contributor Author

I am fully onboard with your approach @xspirus, it is way simpler and easier to read than mine! The only nitpick I have is that you only explain how to add PropEr as a dependency from the latest main version, but do not mention how to use the latest stable release.

What do you think of their approach, Kostis? It has a clear distinction on how to get PropEr, compile it, and use it :)

@kostis
Copy link
Collaborator

kostis commented May 12, 2021

What do you think of their approach, Kostis? It has a clear distinction on how to get PropEr, compile it, and use it :)

Guys, I am all for improving things but, honestly, I do not see what the problem with the current README is.
It does specify how to get PropEr and compile it (git clone ... followed by a make) and it does say how to use it from Erlang.

What it does not say, on purpose, is how to use it from rebar3. But, honestly again, it's not that I do not care about rebar3 or users who may want to use it, but I do not want to hard-code (esp. in the README) stuff that should be in rebar3's README or probably rebar3's manual. Also, tomorrow there may be a rebar4, mix42, ... which offers more advantages than rebar3 or mix. PropEr is not a tool to explain to the whole world how to manage an Erlang project / code base.

IMO, the furthest that PropEr's README can go is to contain links / pointers to these tools (or to hex.pm), but not complete instructions. Perhaps we can place these things in some other page, possibly in the manual.

@xspirus
Copy link
Contributor

xspirus commented May 12, 2021

IMO, the furthest that PropEr's README can go is to contain links / pointers to these tools (or to hex.pm), but not complete instructions. Perhaps we can place these things in some other page, possibly in the manual.

I think you hit the mark on this. Instead of providing a way of using PropEr with rebar3 or mix, links to such tools should be referenced. After that the user can deduct how to use PropEr with such tools.

Comment on lines +126 to +127
> The path that you will need, in most cases, if you used `brew` is
> `/usr/local/Cellar/proper/1.3`

Choose a reason for hiding this comment

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

Please don't recommend users rely on Cellar paths -- these are fragile and could be changed at any moment (i.e. even if proper's version does not change). Instead, users should use what's recommended in brew info proper:

==> Caveats
To use PropEr in Erlang, you may need:
  export ERL_LIBS=/opt/homebrew/opt/proper/proper-1.4

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.

Add more detailed installation instructions with Homebrew
4 participants