validate_app in rebar_otp_app does not need to set the vsn and
original_vsn because they are set from the app details during
discovery.
The original_vsn was set here before becuase when there is no
.app.src or .app.src.script the app file does not go through
preprocess/3 and preprocess/3 is where vsn is set based on evaluating
the vsn from .app.src. But if neither of these files exist it
means the discovery vsn was the correct version and there is
no need to update.
As reported by Alexey Pronin, this would let people potentially pass in
URLs that can call to command execution.
While running arbitrary code is kind of our bread and butter, it makes
sense to at least play nicely and escape more characters:
- the pipe (`|`) which can be used to run subcommands
- the tab (`\t`) which the shell interprets as a space.
- the home directory (`~`) just because the expansion could behave funny
- redirection (`<` and `>`) to avoid problems with data setting up
streams
Before, running `rebar3 ct` on such an empty project would crash with an
internal badmatch since no directory to run CT on could be found.
Now this case will terminate with a sensible error message and won't try
to run any further.
None of the version checks are considered safe enough by mix
maintainers, and so the agreed upon mechanism is to just set this
environment variable, which will be supported implicitly by rebar3
versions that can handle it.
This lets build artifacts (aside from some priv/ issues with plugins) to
properly be located within their build folder rather than the deps
folder, as the --outdir switch would otherwise have done.
Not all of the changes to the git resource were reverted when
the sparse checkout support was moved to a new resource,
git_subdir_resource. This fixes issues caused by these changes
that were accidentally left.
Since the compiler refactor changed the order of steps and all hooks get
applied at once, knowing which app is being escriptized isn't really
obvious, particularly when many apps individually define their own 'main
app' and they get run at once.
This adds the name of the main app being run when escriptizing it to make
it clear what goes on, especially if there are failures.
This was reported in https://github.com/erlang/rebar3/pull/2211#issuecomment-615937628
This patch aims to make rebar3 delete a dependency by first looking for
its name (fixing `del` on hex dependencies) and if that isn't found
remove it as always, keeping its current behaviour with the `del` override.
Starting with OTP-22, Erlang started changing how volume names are handled in
windows: filename:join/1 drops drive letters, filename:split/2 and
file:absname/1 use c:/ as a form instead of c:\\
We adjust the file_utils and their tests accordingly.
Rebar3.14 has new tests that were not windows ready and those are fixed.
Relx has two failing tests that are not covered in this branch.
Tested in Windows 10 with Powershell.