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

Go-to definition jumps to hs-boot files #790

Closed
mpickering opened this issue Mar 27, 2020 · 10 comments · Fixed by #704
Closed

Go-to definition jumps to hs-boot files #790

mpickering opened this issue Mar 27, 2020 · 10 comments · Fixed by #704
Labels
component: ghcide type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@mpickering
Copy link
Contributor

If an identifier is defined in a hs-boot file then jumping to the definition will jump into the hs-boot file.

Technically, this is where the definition is, but really it would be better to jump to the definition in
the source file I think.

@ndmitchell
Copy link
Collaborator

Agreed - jumping to hs-boot files doesn't seem like the right thing to do in most cases.

@jneira
Copy link
Member

jneira commented Oct 2, 2020

I've not observed this nowadays, is it still an issue?

@sgraf812
Copy link

sgraf812 commented Dec 16, 2020

I'm observing this a lot in GHC's code base. Any reference to GHC.Types.Id.idSpecialisation, for example. GHC.Types.Id has an hs-boot file.

Edit: Although I'm on an old ghcide, I suppose. My HLS-wrappr says v0.5.0.0. I could try upgrading if you want me to.

@wz1000
Copy link
Collaborator

wz1000 commented Dec 16, 2020

haskell/ghcide#898 will fix this

@pepeiborra pepeiborra transferred this issue from haskell/ghcide Jan 1, 2021
@alanz
Copy link
Collaborator

alanz commented Jan 3, 2021

I just checked on HLS at 6b0740c, go to definition for LHsExpr takes me to the boot file.

@alanz
Copy link
Collaborator

alanz commented Jan 3, 2021

False alarm, I flushed ~/.cache/ghcide and it now works as intended.

@jneira
Copy link
Member

jneira commented Jan 3, 2021

haskell/ghcide#898 will fix this

the pull request in this repo is: #704

@jneira jneira linked a pull request Jan 3, 2021 that will close this issue
2 tasks
@wz1000
Copy link
Collaborator

wz1000 commented Jan 3, 2021

False alarm, I flushed ~/.cache/ghcide and it now works as intended.

I suspect it will come back on a boot with a primed cache since we will load the locations from .hi files instead of the NameCache.

@alanz
Copy link
Collaborator

alanz commented Jan 3, 2021

Ok, so I must just kill the cache on startup :)

@wz1000
Copy link
Collaborator

wz1000 commented Jan 3, 2021

You can also use my branch :)

@jneira jneira added component: ghcide type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. labels Jan 3, 2021
@mergify mergify bot closed this as completed in #704 Jan 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: ghcide type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants