forked from haskell/haskell-language-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid unnecessary Target canonicalisation in Session setup (haskell#2359
) * Add test-case for projects that use symbolic links In particular, this test checks whether modules that are actually symbolic lins can be found by ghcide. This is known to be broken, as Session.hs canonicalises Targets, e.g. saves the location of the symbolic link. When we later try to load that module, we can't find it, as it won't be part of the known targets since it is not canonicalized. * Dont canonicalise Targets during session setup Canonicalising Targets makes it harder later to actually find the targets during import analysis, as ghcide only looks for modules in the import paths and checks for existence in the known target Map. However, import analysis doesn't canonicalise target candidates, thus the lookup in the known target Map will always fail. We no longer canonicalise Targets, so import analysis will succeed loading modules that are actually symbolic links. * Prefer makeAbsolute over canonicalizePath * Use makeAbsolute to read HIE files from disk * Restore repeated builds the ghcide build fails for win and ghc-8.8 with segfaults Co-authored-by: Javier Neira <atreyu.bbb@gmail.com> Co-authored-by: Pepe Iborra <pepeiborra@gmail.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
Showing
10 changed files
with
46 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
cradle: | ||
direct: | ||
arguments: | ||
- -i | ||
- -isrc | ||
- -iother_loc/ | ||
- other_loc/Sym.hs | ||
- src/Foo.hs | ||
- -Wall |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module Sym where | ||
|
||
foo :: String | ||
foo = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module Foo where | ||
|
||
import Sym | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters