Ask a Question

Failed to update package bbmustache from repo hexpm

Can anybody help me? I installed rebar3 on windows 10 using the git command when i run .\bootstrap.bat in rebar3 directory i get this error. C:\Users\55219\rebar3>.\bootstrap.bat Dependency providers already exists Dependency getopt already exists Dependency cf already exists Dependency erlware_commons already exists Dependency certificate already exists Evaluating config script "c:/Users/55219/rebar3/_build/default/lib/rebar/src/rebar.app.src.script" ===> Verifying dependencies... ===> Failed to update package bbmustache from repo hexpm script: exception error: no match of right hand side value {error, {rebar_app_utils, {missing_package,<<"bbmustache">>,<<"1.10.0">>}}} in function erl_eval:expr/5 (erl_eval.erl, line 450) in call from escript:eval_exprs/5 (escript.erl, line 869) in call from erl_eval:local_func/6 (erl_eval.erl, line 572) in call from escript:interpret/4 (escript.erl, line 780) in call from escript:start/1 (escript.erl, line 277) in call from init:start_em/1 (init.erl, line 1190) in call from init:do_boot/3 (init.erl, line 888) C:\Users\55219\rebar3> I couldn't find any references to help me.

Use https://github.com/erlang/rebar3/discussions for discussions now

Please post your questions to https://github.com/erlang/rebar3/discussions

rebar3 dependencies on github: branches now main instead of master. Already fixed?

I just added a dependency in from github to my project.: https://github.com/zadean/htmerl.git rebar3 does: git clone git://github.com/zadean/htmerl.git .tmp_dir885760416158 -b master --single-branch but github is now expecting: git clone git://github.com/zadean/htmerl.git .tmp_dir885760416158 -b main --single-branch So branch master is changed to main. I don't want to start a discussion about software and PC - wrong place here. BUT I am using rebar 3.9.1. Is there a switch/option to change the branch name of the git repo? Is this fixed or possible in the latest version? Best Regards Markus

rebar3 eunit symlink failure

This has started happening more and more and so far the only workaround is to `rm -fr _build` which is of course irritating as I have to then wait for everything to download and rebuild. The problem is something to do with a symlink: ``` $ rebar3 eunit rebar3 eunit ===> Verifying dependencies... cp: symlink: [email protected]: File exists ===> sh(cp -Rp /Users/sean/Documents/code/erlang/scofblog/test/newcomment_h_test.erl /Users/sean/Documents/code/erlang/scofblog/test/activate_h_test.erl /Users/sean/Documents/code/erlang/scofblog/test/activate_impl_SUITE.erl /Users/sean/Documents/code/erlang/scofblog/test/newcomment_impl_SUITE.erl /Users/sean/Documents/code/erlang/scofblog/test/#newcomment_h_test.erl# /Users/sean/Documents/code/erlang/scofblog/test/messages_test.erl /Users/sean/Documents/code/erlang/scofblog/test/lifecycle_test_SUITE.erl /Users/sean/Documents/code/erlang/scofblog/test/.#newcomment_h_test.erl /Users/sean/Documents/code/erlang/scofblog/test/rebar.lock /Users/sean/Documents/code/erlang/scofblog/test/utils_test.erl /Users/sean/Documents/code/erlang/scofblog/test/dbms_SUITE.erl /Users/sean/Documents/code/erlang/scofblog/test/testhelp.erl /Users/sean/Documents/code/erlang/scofblog/test/comment_impl_SUITE.erl "/Users/sean/Documents/code/erlang/scofblog/_build/test/lib/scofblog/test") failed with return code 1 and the following output: cp: symlink: [email protected]: File exists FAIL: 1 ``` I have no idea what I did to make this happen, I've been working on this particular project for a while without issue and then without warning it started happening. I don't have any idea of a cause other then could it be related to me writing EUnit tests that fail a lot before I get them to pass?!?!?!

Installing rebar3 on Windows

Dear community, I would like to know how to install rebar3 on Windows, using the Powershell (or any other tool). I've read the "Getting started" and the instructions for Windows users, but somehow don't seem to be able to get it running. In the instructions I get stuck at the last two parts: "make a file using notepad.exe with the contents of the .cmd invoker for escript to run rebar3 (provided in this document below) open a new command-line and type rebar3" Is there someone who'd like to help me out? I'm not really sure what the .cmd invoker for escript does or how it works. I'm also not entirely sure about the last instruction "open a new command-line and type rebar3" in the sense; do I do this using Elixer (iex.bat) or just the regular Powershell path? I get the following error: iex(1)> C:\Users\ewoud\bin$ ./rebar3 local install ===> Extracting rebar3 libs to ~/.cache/rebar3/lib... ===> Writing rebar3 run script ~/.cache/rebar3/bin/rebar3... ===> Add to $PATH for use: export PATH=$PATH:~/.cache/rebar3/bin** (SyntaxError) iex:1: keyword argument must be followed by space after: C: iex(1)> ** (SyntaxError) iex:1: unexpected token: "~" (column 32, code point U+007E) As well as this one in the regular powershell command line: ./rebar3 : The term './rebar3' is not recognized as the name of a cmdlet, function, script file, or operable program. C heck the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + ./rebar3 local install + ~~~~~~~~ + CategoryInfo : ObjectNotFound: (./rebar3:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException Any help is appreciated! Thank so much. Ewoud

rebar3 on osx: Terminal.app and iTerm both broken after quitting a session with CTRL-C

Hi, I recently switched to Mac for ongoing development and whenever I abort with Ctrl-C Ctrl-C it leaves them in a broken state. When I end with `q()` it seems to be fine so I am guessing in the shutdown code there is something being missed. I suspect someting like a raw mode stty setting or something like that has not been restored, the visual effect is of the CR not being carried out, only the LF part. The following shows the end of a clean exit, followed by a dirty one and you can see the problem. ``` | scofblog % ls [email protected] LICENSE logbook.md rebar.lock README.md poke_activate_email.sh reset.sql _build poke_dpost_comment.sh src db_create.sql poke_get_comments.sh test db_testdata.sql poke_post_comment.sh topic1.dat log rebar.config utils.beam ±|master ✘| scofblog % rebar3 shell [email protected] ===> Verifying dependencies... ===> Compiling scofblog Erlang/OTP 23 [erts-11.0.3] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe] [dtrace] Eshell V11.0.3 (abort with ^G) 1> ===> The rebar3 shell is a development tool; to deploy applications in production, consider using releases (http://www.rebar3.org/docs/releases) ===> Booted epgsql ===> Booted syntax_tools ===> Booted compiler ===> Booted goldrush ===> Booted lager ===> Booted cowlib ===> Booted ranch ===> Booted cowboy ===> Booted scofblog ±|master ✘| scofblog ls % sLICENSE logbook.md rebar.lock README.md poke_activate_email.sh reset.sql _build poke_dpost_comment.sh src db_create.sql poke_get_comments.sh test db_testdata.sql poke_post_comment.sh topic1.dat log rebar.config utils.beam % ±|master ✘| scofblog % s ```

rebar3 compile not compiling _checkouts dependencies?

Hi, I was expecting that running 'rebar3 compile' would recompile any dependency in the _checkouts directory that would need it, however I purposely introduced lines that cannot compile in a .erl of such _checkouts dependency, and - despite a very long time spent in " ===> Analyzing applications...", 'rebar3 compile' succeeded - whereas it should not have. However doc says (in https://www.rebar3.org/docs/commands#compile) that: """ compile After ensuring all dependencies are available, and fetching them if they are not, compile will compile the needed dependencies and the project's apps .app.src and .erl files. """ This test was done after operated changes in a _checkouts dep were absent from a release. Am I missing something? Thanks!

How to protect my source code project which is built with rebar3 ?

Hi, I have built a project using: $ rebar3 new app myhello Now, everytime I want to run my project, I need to run: $ rebar3 shell I want to deploy my project on an external server, without sharing my source code .erl. How to do this please? Thanks

Unexpected error caught in rebar_core when setting logdir

Hi, I added this to my rebar.config as I only wanted the current run and I wanted them in the project root folder to make it easier to .gitignore and also make them visible to me: ``` {ct_opts, [{keep_logs, 1} ,{logdir, "./ct_logs"}] }. ``` When I run with `rebar3 ct` I get this error, ===> Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace or consult rebar3.crashdump and taking that advice I get a stack trace (at end) which seems to indicate that the "last" folder, a symlink, couldn't be found. If I "rm -fr" the _build folder the problem goes away for one build but then comes back, it's almost as though there is a hardcoded location still looking in the default location for that symlink. Have I done something (probably) wrong in my configuration ? Thanks, Sean. === ``` ===> Uncaught error: {badmatch,{error,enoent}} ===> Stack trace to the error location: [{rebar_prv_common_test,symlink_to_last_ct_logs,1, [{file,"/home/sean/Documents/erlang/rebar3/src/rebar_prv_common_test.erl"}, {line,128}]}, {rebar_prv_common_test,do,2, [{file,"/home/sean/Documents/erlang/rebar3/src/rebar_prv_common_test.erl"}, {line,77}]}, {rebar_core,do,2, [{file,"/home/sean/Documents/erlang/rebar3/src/rebar_core.erl"}, {line,154}]}, {rebar3,run_aux,2, [{file,"/home/sean/Documents/erlang/rebar3/src/rebar3.erl"}, {line,181}]}, {rebar3,main,1, [{file,"/home/sean/Documents/erlang/rebar3/src/rebar3.erl"}, {line,66}]}, {init,start_em,1,[]}, {init,do_boot,3,[]}] ```

rebar3, supervisor, behaviour(application)

Hi All, I have the following straightforward UDP Server: - ONLY accept Data <<0:32>>, - otherwise it crash -module(server). -export([listen/1]). listen(Port) -> spawn(fun()->run_it(Port) end). run_it(Port) -> {ok, Skt} = gen_udp:open(Port, [binary]), loop(Skt). loop(Skt) -> receive {udp, Skt, _, _, Bin} -> case Bin of <<0:32>> -> io:fwrite("~p~n", [{"Good Format: ", Bin}]), loop(Skt) end end. Now, Client is going to send a malformed data. I can write a case clause to match any message and simply ignore any malformed message. However, that would be a catch-all-clause, which will not help me if there is eventual bugs. I have read somewhere: "Don't program defensively, let it crash, then fix it". =ERROR REPORT==== 19-Jul-2020::21:15:29.872000 === Error in process <0.93.0> with exit value: {{case_clause,<<0>>},[{ggsn,loop,1,[{file,"ggsn.erl"},{line,16}]}]} Cool, it crash, But I want my server to restart automatically anyway :-) I have read also that a process called "supervisor" can monitor my server and restarts it when it detects that it died. So, I DISCOVERED "rebar3" because it helped me a lot when I compile several files with just 1 single line 'rebar3 compile'. It creates automatically a /src/ with 3 files, but only 2 are interesting me for now: - server_app.erl - server_sup.erl Ok, I have read the documentations but I'm still far from understanding. Can anyone advise please, or transform my 19 lines of code server.erl to server_app.erl and supervised by a server_sup.erl using rebar3? Thanks in advance, Best Regards,