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

Prevent crashes on recursive src_dir definitions in deps #2582

Merged
merged 2 commits into from
Jun 21, 2021

Conversation

ferd
Copy link
Collaborator

@ferd ferd commented Jun 18, 2021

In some rare cases (see #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 acknowledge 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.

Possibly fixes #2581 but I haven't been able to reproduce this in tests
since it seems to require a very peculiar setup to trigger.

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.
Co-authored-by: Denis Anufriev <anufriev.denis.e@gmail.com>
@ferd ferd merged commit a575f0e into erlang:master Jun 21, 2021
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.

re-compilation is crashed for project that have dep with option src_dirs set to [{"src", [{recursive, true}]}]
2 participants