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

[#1046,#1064] Follow symlinks in els_utils:resolve_paths/2 #1394

Merged
merged 1 commit into from
Nov 8, 2022

Conversation

the-mikedavis
Copy link
Contributor

Description

#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.

I tested this in a rebar3 project with checkout dependencies and in a Bazel project and it works well. I haven't noticed any regressions, so I think the changes in #648 fixed the issue in #339.

Fixes #1046.
Fixes #1064.

…_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
Copy link
Member

Thanks for this @the-mikedavis! We could give this a try and keep an extra eye in case regressions pop up. FYI @alanz @plux in case you have any concerns with this.

@robertoaloi robertoaloi merged commit 8e4dcf8 into erlang-ls:main Nov 8, 2022
@the-mikedavis the-mikedavis deleted the md-follow-symlinks branch November 8, 2022 12:55
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.

Sym links are not followed Have deps_dirs follow sym links
2 participants