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

Support the same project checked out in different directories #4215

Open
coot opened this issue May 7, 2024 · 5 comments
Open

Support the same project checked out in different directories #4215

coot opened this issue May 7, 2024 · 5 comments
Assignees
Labels
component: ghcide component: hie-bios type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. type: enhancement New feature or request

Comments

@coot
Copy link

coot commented May 7, 2024

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

@fendor fendor added type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. component: hie-bios component: ghcide and removed status: needs triage labels May 7, 2024
@fendor fendor self-assigned this May 7, 2024
@fendor
Copy link
Collaborator

fendor commented May 7, 2024

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?

@michaelpj
Copy link
Collaborator

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

@fendor
Copy link
Collaborator

fendor commented May 8, 2024

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

We do in hie-bios, hence my questions.

@coot
Copy link
Author

coot commented May 11, 2024

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

@fendor
Copy link
Collaborator

fendor commented May 12, 2024

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*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: ghcide component: hie-bios type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants