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

[#339] Resolved paths include symlinks #346

Merged
merged 2 commits into from
Dec 20, 2019

Conversation

jfacorro
Copy link
Contributor

@jfacorro jfacorro commented Dec 20, 2019

Description

Move the resolve_paths function to els_utils and modifiy it so that it excludes paths were there is a symlink somewhere between the RootPath argument and the actual path. This is mainly to avoid processing all of the symlinked directories under the _build directorie when using rebar3.

Fixes #339.

@jfacorro jfacorro requested review from robertoaloi and alanz and removed request for robertoaloi December 20, 2019 14:38
@jfacorro jfacorro force-pushed the 339-resolved-paths-include-symlinks branch from 257cca0 to 96a0a92 Compare December 20, 2019 15:04
@robertoaloi robertoaloi merged commit 9b25c89 into master Dec 20, 2019
@robertoaloi robertoaloi deleted the 339-resolved-paths-include-symlinks branch December 20, 2019 15:49
the-mikedavis added a commit to the-mikedavis/erlang_ls that referenced this pull request Oct 24, 2022
…_paths/2`

erlang-ls#346 discarded any paths containing symlinks since
they broke assumptions about there being a single URI for each module
in calls to `els_utils:find_module/1`.

erlang-ls#648 added prioritization for cases when there are
multiple URIs in `els_utils:find_module/1`, so discarding paths with
symlinks is now no longer necessary.

Following symlinks is necessary when using rebar3 checkout dependencies
(erlang-ls#1046) or when using Bazel
(erlang-ls#1064) since Bazel places dependencies and compiled
files under its cache directory and symlinks the relevant directory in
the cache to the workspace directory.

This change removes the behavior of `els_utils:resolve_paths/2` that
discards paths containing symlinks.
robertoaloi pushed a commit that referenced this pull request Nov 8, 2022
#346 discarded any paths containing symlinks since
they broke assumptions about there being a single URI for each module
in calls to `els_utils:find_module/1`.

#648 added prioritization for cases when there are
multiple URIs in `els_utils:find_module/1`, so discarding paths with
symlinks is now no longer necessary.

Following symlinks is necessary when using rebar3 checkout dependencies
(#1046) or when using Bazel
(#1064) since Bazel places dependencies and compiled
files under its cache directory and symlinks the relevant directory in
the cache to the workspace directory.

This change removes the behavior of `els_utils:resolve_paths/2` that
discards paths containing symlinks.
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.

Paths resolved by configuration include symlinks
2 participants