Skip to content

Support the same project checked out in different directories #4215

@coot

Description

@coot

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

Activity

self-assigned this
on May 7, 2024
fendor

fendor commented on May 7, 2024

@fendor
Collaborator

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

michaelpj commented on May 7, 2024

@michaelpj
Collaborator

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

fendor

fendor commented on May 8, 2024

@fendor
Collaborator

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

We do in hie-bios, hence my questions.

coot

coot commented on May 11, 2024

@coot
Author

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

fendor

fendor commented on May 12, 2024

@fendor
Collaborator

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

Metadata

Metadata

Assignees

Labels

component: ghcidecomponent: hie-biosstatus: needs infoNot actionable, because there's missing informationtype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..type: enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @coot@michaelpj@fendor

      Issue actions

        Support the same project checked out in different directories · Issue #4215 · haskell/haskell-language-server