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

Allow specifying the outdir in bare compiler #2237

Merged
merged 1 commit into from
Feb 27, 2020

Conversation

ferd
Copy link
Collaborator

@ferd ferd commented Feb 21, 2020

Currently, we just write to ebin/ in the current working directory; this
implies that the source should always be in the same subpath as the
ebin/ directory.

In the cases of utils like Mix, which store downloaded dependencies in
deps/ and artifacts in _build/, this may force more rebuild or less
caching that would be ideal.

This PR adds --outdir / -o as options to the bare compiler, which lets
the user specify another path, with a default kept to $CWD.

Currently, we just write to ebin/ in the current working directory; this
implies that the source _should_ always be in the same subpath as the
ebin/ directory.

In the cases of utils like Mix, which store downloaded dependencies in
deps/ and artifacts in _build/, this may force more rebuild or less
caching that would be ideal.

This PR adds --outdir / -o as options to the bare compiler, which lets
the user specify another path, with a default kept to $CWD.
@ferd ferd force-pushed the allow-bare-compile-outdir branch from 0c73a84 to eda264a Compare February 21, 2020 15:55
@tsloughter tsloughter merged commit 9952736 into erlang:master Feb 27, 2020
tsloughter added a commit that referenced this pull request Feb 28, 2020
Allow specifying the outdir in bare compiler
tsloughter added a commit that referenced this pull request Feb 28, 2020
Allow specifying the outdir in bare compiler
starbelly pushed a commit to starbelly/elixir that referenced this pull request May 12, 2020
rebar3 as of 3.13.2 now supports a --output directory option which
allows mix going forward to use said option and put build artifacts in
_build which should result and less rebuilding of artifacts and/or
better caching of artifacts. Details here: erlang/rebar3#2237

In order to make use of said feature we must put a variable in the system's environment that shall hold the
desired output path. rebar3 will recognize said environment variable going forward starting at version 3.14
(yet to be released).

- Updated Mix.Tasks.Deps.Compile to put REBAR_BARE_COMPILER_OUTPUT_DIR in system env with the dependency path as the
value for use by rebar3.
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