[erlang-questions] Yaws and rebar3

Fred Hebert mononcqc@REDACTED
Wed Apr 25 15:42:25 CEST 2018


By default, there's a kind of assumption in rebar3 that you'll use releases
to deploy your systems. If you do not, you can use the `rebar3 path' to
return a list of all paths, or use specific options:

  --app            Comma separated list of applications to return paths
                   for.
  --base           Return the `base' path of the current profile.
  --bin            Return the `bin' path of the current profile.
  --ebin           Return all `ebin' paths of the current profile's
                   applications.
  --lib            Return the `lib' path of the current profile.
  --priv           Return the `priv' path of the current profile's
                   applications.
  -s, --separator  In case of multiple return paths, the separator
                   character to use to join them.
  --src            Return the `src' path of the current profile's
                   applications.
  --rel            Return the `rel' path of the current profile.

So for a command like yours, you could use something like -pa `rebar3 path
--separator=" -pa " to generate explicit path additions for all
dependencies, or use something like `erl -env ERL_LIBS `rebar3 path --lib`
and get mostly the same result. When working under a different profile
(i.e. tests with new dependencies) you can go `rebar3 as test path ...' and
get it to work.

The `path' task only relies on the 'app discovery' subtask, which basically
means that it relies only on the ability of rebar3 to read the shape of
your base repo to work. Using this task with `rebar3 get-deps' lets you use
rebar3 as a tool solely dedicated to fetching and upgrading dependencies,
without caring about the compilation or release phases if you were to use a
different tool.

On Wed, Apr 25, 2018 at 4:02 AM, Martin Dimitrov <mrtndimitrov@REDACTED>
wrote:

>
>
> Hello,
>
>
>
> I am stuck with rebar3. It generates so many directories and files that I
> am kind of lost �� Previously we were starting our app as:
>
>
>
> erl.exe -sname <name> +A 1024 -setcookie <cookie> -boot start_sasl -config
> harmony_DEV -pa "<path-to-yaws>/ebin" -pa "../lib/rabbit_common-3.4.0\ebin"
> -pa "../lib/amqp_client-3.4.0/ebin" -pa "../lib/goldrush-0.1.8/ebin" -pa
> "../lib/lager-3.1.0/ebin" -pa "../lib/gen_smtp-0.9.0/ebin" -pa
> "../deps/inventory/ebin" -pa "../deps/oauth/ebin" -pa "../deps/rete/ebin"
> -conf "yaws_DEV.conf" -run yaws -i
>
>
>
> Now I’ve put lager and the rabbit libs as dependencies in the rebar3
> config. But do I put yaws as a dependency as well and from where the run
> the above command?
>
>
>
> Thanks in advance,
>
> Martin
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20180425/668922d5/attachment.htm>


More information about the erlang-questions mailing list