Skip to content
This repository has been archived by the owner on May 12, 2018. It is now read-only.

Introduce REBAR_DEPS_PREFER_LIBS env variable to alter search behaviour #589

Merged
merged 1 commit into from
Mar 17, 2016

Conversation

matwey
Copy link
Contributor

@matwey matwey commented Feb 18, 2016

When REBAR_DEPS_PREFER_LIBS is set, dependencies with defined sources
are allowed to be searched for in system lib directory.

Under specific circumstances (i.e. in build environments without networking)
it is impossible to fetch deps locally. So, user needs a way to ask rebar to
search in system lib directory as well.

Signed-off-by: Matwey V. Kornilov matwey.kornilov@gmail.com

@lrascao
Copy link
Contributor

lrascao commented Mar 12, 2016

+1, could you please append your name to the THANKS file, document the variable in the wiki (Environment variables section) and write a small test in inttest/ to prevent future regressions? A test in the same style as the tdeps/ would be sufficient

@matwey
Copy link
Contributor Author

matwey commented Mar 12, 2016

REBAR_DEPS_PREFER_LIBS

REBAR_DEPS_PREFER_LIBS is boolean environment variable. When it is set, rebar looks for all dependencies in system-wide lib directory.
In some restricted build environments all dependencies are usually already pre-installed into specific system-wide place, whereas internet access is prohibited which makes git clone useless.

@ghost
Copy link

ghost commented Mar 14, 2016

We should explain REBAR_DEPS_FORCE_LIB in the rebar_deps help string (rebar_deps:info).

@ghost
Copy link

ghost commented Mar 14, 2016

A short explanation can be something like this: "If REBAR_DEPS_FORCE_LIB is set, consider only deps found in the code path and skip fetching."

@ghost
Copy link

ghost commented Mar 14, 2016

Thinking about it, would it be clearer to rename REBAR_DEPS_FORCE_LIB to REBAR_DEPS_FORCE_SYS, REBAR_DEPS_IGNORE_LOCAL or something similar. It's unclear to me what FORCE_LIB means.

@matwey
Copy link
Contributor Author

matwey commented Mar 14, 2016

I think IGNORE_LOCAL is not exact because local is not ignored completely, it is just scanned after system. REBAR_DEPS_FORCE_LIB is accordant with ERL_LIBS
However, I am fine with any name.

@ghost
Copy link

ghost commented Mar 14, 2016

How about PREFER_LIB or PREFER_SYS?

@matwey
Copy link
Contributor Author

matwey commented Mar 14, 2016

Maybe REBAR_DEPS_PREFER_LIBS in plural?

@ghost
Copy link

ghost commented Mar 14, 2016

Works for me. @lrascao?

@lrascao
Copy link
Contributor

lrascao commented Mar 14, 2016

Sure, looks good.
@matwey could you please rebase onto master? we've merged some stuff in the meantime

When REBAR_DEPS_PREFER_LIBS is set, dependencies with defined sources
are allowed to be searched for in system lib directory.

Under specific circumstances (i.e. in build environments without networking)
it is impossible to fetch deps locally. So, user needs a way to ask rebar to
search in system lib directory as well.

Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
@matwey matwey changed the title Introduce REBAR_DEPS_FORCE_LIB env variable to alter search behaviour Introduce REBAR_DEPS_PREFER_LIBS env variable to alter search behaviour Mar 14, 2016
@matwey
Copy link
Contributor Author

matwey commented Mar 17, 2016

Any news? I don't remember whether you have email notifications when I rebase the request.

@lrascao
Copy link
Contributor

lrascao commented Mar 17, 2016

Sorry, got busy with stuff, will merge today

lrascao added a commit that referenced this pull request Mar 17, 2016
Introduce REBAR_DEPS_PREFER_LIBS env variable to alter search behaviour
@lrascao lrascao merged commit 384af7e into rebar:master Mar 17, 2016
lemenkov added a commit to fedora-erlang/erlang-rpm-macros that referenced this pull request May 13, 2016
See PR rebar/rebar#589

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants