haskell-language-server icon indicating copy to clipboard operation
haskell-language-server copied to clipboard

Support the same project checked out in different directories

Open coot opened this issue 1 year ago • 5 comments

It seems that HLS can get confused when working on the same project cloned in different directories. When I had to work using such a setup, there was only one entry in ~/.cache/hie-bios/dist-<project>-<hash>.

coot avatar May 07 '24 08:05 coot

How are the projects cloned? The <project> part is the name of the directory, so if you have cloned them into different directories, it should result in a different directory.

Can you reproduce the issue with solely hie-bios, or what issue are you encountering?

fendor avatar May 07 '24 14:05 fendor

Could we just include the canonical path as an input into the hash?

michaelpj avatar May 07 '24 22:05 michaelpj

Could we just include the canonical path as an input into the hash?

We do in hie-bios, hence my questions.

fendor avatar May 08 '24 07:05 fendor

I cloned the same repository (with multiple cabal packages) in two different directories using git clone, yet there was only one cache entry.

coot avatar May 11 '24 15:05 coot

Please provide instructions, I checked locally with:

$ rm -rf ~/.cache/hie-bios
$ cd path/to/hls
$ code .
$ cd path/to/hls2
$ ls ~/.cache/hie-bios
dist-hls-036ebb56a4cc135651b7510a90f3136d/  dist-hls2-128478ae21d411550ff54014715bf829/  ghc-pkg-e592c0c412aa044affaee5b877832a00*  wrapper-b54f81dea4c0e6d1626911c526bc4e36*

I additionally tested with making sure, both checkouts have the same name:

$ rm -rf ~/.cache/hie-bios
$ cd path/to/hls
$ code .
$ cd other/path/to/hls
$ ls ~/.cache/hie-bios
dist-hls-036ebb56a4cc135651b7510a90f3136d/  dist-hls-81c43fbeddda3d9dc27d19db33a51842/  ghc-pkg-e592c0c412aa044affaee5b877832a00*  wrapper-b54f81dea4c0e6d1626911c526bc4e36*

fendor avatar May 12 '24 14:05 fendor