Skip to content

General improvements#27

Open
rustkas wants to merge 6 commits intouwiger:masterfrom
rustkas:General-Improvements
Open

General improvements#27
rustkas wants to merge 6 commits intouwiger:masterfrom
rustkas:General-Improvements

Conversation

@rustkas
Copy link

@rustkas rustkas commented Jun 1, 2022

List of modifications

  • Makefile

    • Remove the need for the rebar3 application in the project folder. Added download over the network.
  • ./make_doc

    • Fix missing path error while running ./make_doc
    • Update name of edoc doclet module from "doclet" to "edoc_doclet"
  • ./edown_make

    • Fix EDoc warnings related to depricated @spec tag.
  • src/edown_make.erl

    • Fix EDoc warnings related to depricated @spec tag.
  • src/edown_doclet.erl

    • Fix EDoc warnings related to depricated @spec tag.
  • rebar.config

    • Add settings for hex.pm documentation documentation.
  • README.md

    • Add information related to an option of ExDoc generation of project source code.
    • Add escape marker to backticks.

rustkas added 2 commits June 1, 2022 09:50
- Makefile
  - Remove the need for the rebar3 application in the project folder. Added download over the network.
- ./make_doc
  - Fix missing path error while running ./make_doc
  - Update name of edoc doclet module from "doclet" to "edoc_doclet"
- ./edown_make
  - Fix EDoc warnings related to depricated @SPEC tag.

- src/edown_make.erl
  - Fix EDoc warnings related to depricated @SPEC tag.
- src/edown_doclet.erl
  - Fix EDoc warnings related to depricated @SPEC tag.
- rebar.config
  - Add settings for hex.pm documentation documentation.
- README.md
  - Add information related to an option of ExDoc generation of project source code.
  - Add escape marker to backticks.
@uwiger
Copy link
Owner

uwiger commented Jun 27, 2022

Have you tried building this from scratch?
As far as I can tell, the Makefile doesn't work.
$(REBAR) references should be replaced with $(REBAR3, and it should also be added as a dependency to the other targets.

@rustkas
Copy link
Author

rustkas commented Jun 27, 2022

Yes, I tried.
Then I made it more useful in a practical way while study this project. I hope you like what I've made.

@uwiger
Copy link
Owner

uwiger commented Jun 28, 2022

Well, automatically downloading rebar3 does feel better than always shipping a pre-compiled version, but it would need to be implemented in such a way that running make (and specific targets) on a clean repos automatically works.

The priority order should be:

  • use ./rebar3 (if present)
  • use rebar3 in path
  • download rebar3 from s3

Also, the Erlang node started to do the download tends to issue SSL. These should be silenced if expected.

~/test/edown$ make
erl -noshell -s inets -s ssl \
  -eval '{ok, saved_to_file} = httpc:request(get, {"https://s3.amazonaws.com/rebar3/rebar3", []}, [], [{stream, "./rebar3"}])' \
  -s init stop
=WARNING REPORT==== 28-Jun-2022::10:24:30.067788 ===
Description: "Authenticity is not established by certificate path validation"
     Reason: "Option {verify, verify_peer} and cacertfile/cacerts is missing"

chmod +x ./rebar3
./rebar3 compile

Perhaps using an escript would be cleaner?

@uwiger
Copy link
Owner

uwiger commented Jun 28, 2022

Perhaps you could break out the Makefile changes into a separate (WIP) PR? The other changes are less problematic.

@rustkas
Copy link
Author

rustkas commented Jun 28, 2022

Perhaps you could break out the Makefile changes into a separate (WIP) PR? The other changes are less problematic.

Of course, this is one of the solution.
I like your suggested solution (three steps checking):

  1. use ./rebar3 (if present)
  2. use rebar3 in path
  3. download rebar3 from s3

It is possible to make as a Bash script. Let's add this solution what you think?

rustkas added 4 commits July 8, 2022 21:48
Rewrite Makefile using Make utility and Bash script capabilities.

Implement suggested priority order finding and launching of `rebar3` (script tested using Linux (Ubuntu)):

* use ./rebar3 (if present)
* use `rebar3` in path
* download `rebar3` from `s3`

The Erlang downloads `rebar3` without warning messages.
Edited the BUILDER variable definition. Removed unnecessary export.
Simplify script. Remove OS dependent checking.
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.

2 participants

Comments