Skip to content

Conversation

@clevesque22
Copy link

Merge tag 3.17.0 into the vht_erlang_23

thomasdavid and others added 30 commits February 12, 2021 07:29
…unction calls.

Summary: Before, the xref_ignores would properly ignores function calls on specified modules. That is,
even though {xref_ignores, [ModName,...]} would be in rebar3.config, those unassigned function calls
to and from the ModName module would be displayed.

This was due to a mismatch between the format of the ignore (a module name), and the format of the
warning ({MFA, MFA} or MFA) emmited by xref.
This apparently never worked properly, the call being made swapped
arguments order, but kept the type correct enough that no type warning
would be raised.

This isn't a problem though, because before this optimization, people
were already used to calling 'rebar3 update' before upgrading a plugin.
This being fixed makes that call optional now.
…update

Fix optimistic registry update of plugins being upgraded
Added SSL cacert patch to support Corporate MITM Proxies
this takes the current path formatting (which reuses compiler-specific
functions) and makes it contextual to knowing whether files exist or
not. The compiler path printing assumes all directory paths are
project-local, but PLTs only occasionally fit this description. On first
copies, they don't.

This currently yields output such as:

    ===> Building with 204 files in ../.cache/rebar3/rebar3_24.0.2_plt...
    ===> Copying ../.cache/rebar3/rebar3_24.0.2_plt to _build/default/rebar3_24.0.2_plt...
    ===> Checking 204 files in _build/default/rebar3_24.0.2_plt...
    ===> Adding 29 files to _build/default/rebar3_24.0.2_plt...
    ===> Doing success typing analysis...
    ===> Resolving files...
    ===> Analyzing 13 files with _build/default/rebar3_24.0.2_plt...

Whereas this patch instead allows the following formatting:

    ===> Dialyzer starting, this may take a while...
    ===> Updating plt...
    ===> Resolving files...
    ===> Updating base plt...
    ===> Resolving files...
    ===> Checking 204 files in /home/ferd/.cache/rebar3/rebar3_24.0_plt...
    ===> Copying /home/ferd/.cache/rebar3/rebar3_24.0_plt to /tmp/chk/_build/default/rebar3_24.0_plt...
    ===> Checking 204 files in _build/default/rebar3_24.0_plt...
    ===> Doing success typing analysis...
    ===> Resolving files...
    ===> Analyzing 2 files with _build/default/rebar3_24.0_plt...

That `Copying <from> to <dest>` message is always going to have the
`<dest>` value be absolute just because I can check whether a relative
path exists before normalizing on the absolute path, which is the
simplest way to make this work without major rework of output functions
to attach them all to the calling context to know when a path may or may
not be absolute.

Fixes erlang#2577
…unction calls.

Summary: Before, the xref_ignores would properly ignores function calls on specified modules. That is,
even though {xref_ignores, [ModName,...]} would be in rebar3.config, those unassigned function calls
to and from the ModName module would be displayed.

This was due to a mismatch between the format of the ignore (a module name), and the format of the
warning ({MFA, MFA} or MFA) emmited by xref.
{xref_ignores} now properly works on module,
Fix ssl check hostname options for wildcard certificate
In some rare cases (see erlang#2581
for a sample interplay between plugins and recursive dep definitions
with apps) there can be some interplay where a dependency declares
recursive directories but the lookup for app files does not acknowledges
these and causes problems.

This patch simply ignores such cases by stripping options; this should
have no backward compatibility impact since the value was just ignored
before anyway, but will prevent crashes in hard-to-reproduce cases.
Prevent crashes on recursive src_dir definitions in deps
bootstrap is always on an immediate run and should be skippable safely
when dealing with compiler versions.

As suggested by @saleyn in erlang#2584
…nings

Drop bootstrap URI handling functions warnings
Handle abstract code starting with a non-file attribute
Make `rebar_file_utils:system_tmpdir/1` take `TMPDIR` env var into account on *nix
ferd and others added 14 commits July 31, 2021 12:26
Assume that the original app order respects the dependency order as supplied by
the rebar3 dependency order. Then what we do is interleave the hard compile-
time dependencies as found by analysis to maintain their ordering constraints
into those given by the dependency order.

This should lower the chance of hitting conflicts when runtime dependencies
become compile-time dependencies via interactions in parse transform calls.
When developing `relx` and testing changes with `rebar3`, it is convenient to make `relx` a checkout dependency.

However, the current implementation of `escript_incl_extra` expects the output directory of `relx` to be under `_build/<profile>/lib/`, which is not the case if `relx` is a checkout dependency.

Instead of making a breaking change to `escript_incl_extra`, introduce a new config parameter instead.
…with-_checkouts

Add escript_incl_priv so escriptize priv dir inclusion works with _checkouts and profiles
As described in erlang#2563,
part of the previous approach's weakness is that we need to
seed the compile order with the dependency order for some
invisible compile-time dependencies (runtime ones turned
to build-time ones via calls to parse-transforms).

Unfortunately, topological sorting is insufficient due to how it
flattens apps. Assume the DAG contains:

    a -> b
    c -> d

then a valid topological sort would be `[a,c,b,d]`. However, if we
introduce the hidden dep (and decide that `c` calls `b`in a
parse_transform) that the DAG doesn't contain, then the sorting order
is broken.

However, if we initially carried the `[x,b,a,c,f,e,d]` dep list,
we can use a run over it to build `[x,a,b,c,f,e,d]` final compile
order.
Give compiler hints when handling run-time deps in parse_transforms
This comes in coniunction with erlware/relx#882, that allows RELX to accept in its state a method to filter xref warnings.
We pass to it the method that rebar3 currently uses to filter them based on the ignore-xref attributes in erlang file.
https://github.com/erlware/relx/releases/tag/v4.5.0

- use copied erts dir when tar'ing even when the user sets the erts
- improve error message when a symlink creation fails
- State extended with a filter method to filter xref_warnings
- Do not require logger
- Add default time warp mode of multi
- optionally allow static node name prefixes
- use random:uniform instead of os:pid when constructing node name in nodetool
- Fix eval command to use ERL_DIST_PORT, consistency with rpc command
- Fix bin script arguments to erlexec
- avoid quoting $@ in bin script's exec
…_callback

rebar3 release to honour the ignore-xref attribute
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.

10 participants