Skip to content

Navigation between multiple components #44

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

Closed
backuitist opened this issue Feb 17, 2020 · 9 comments
Closed

Navigation between multiple components #44

backuitist opened this issue Feb 17, 2020 · 9 comments
Labels

Comments

@backuitist
Copy link

It would be nice to be able to navigate between symbols of different components in a multi cradle setup. Currently it says "no definition found".

I created a simple test project to try this out: https://github.com/backuitist/nix-haskell-multi-package

This issue was originally raised on HIE: haskell/haskell-ide-engine#1656

@jneira jneira added the type: enhancement New feature or request label Feb 18, 2020
@sir4ur0n
Copy link
Collaborator

sir4ur0n commented Jun 6, 2020

I don't know if this belongs here or in another issue: one feature we LOVE in my team with Intellij-Haskell is the capacity to also navigate to library code using "Jump to definition". This is incredibly useful to learn the language and/or learn how to use a library.

Let me know if this is a completely different matter and I'll open another issue

@fendor
Copy link
Collaborator

fendor commented Jun 12, 2020

Afaict, this should work now. Both components need to be loaded, e.g. a file from each component has been opened at some point, and then goto cross component works.

@sir4ur0n
Copy link
Collaborator

We just tested with a coworker today, and none of us succeeded in navigating between 2 components (from a test component to a main one) 🤔 Have you successfully made it work on some project?
If so, we can try to pull together a minimal scenario to reproduce... But I'm curious to know if anyone has seen this feature work?

@fendor
Copy link
Collaborator

fendor commented Jun 25, 2020

Yeah, I am positive that I've seen this feature work (and I am actively using it). A reproducible example would be great!

@TomMD
Copy link

TomMD commented Jun 25, 2020

I keep look at this thread and thinking there is a mis-communication. Please forgive me if I'm wrong.

The behavior I observe:

  1. Clone the repository.
  2. Edit tta/src/Main.hs
  3. Try to jump to helloBla or hello2's definition.

This fails and that failure is expected.

  1. Edit tta/src/Main.hs
  2. Open in a new tab (or other editor abstraction) tt1/src/Hello1.hs
  3. In Main.hs jump to definition of helloBla.

This works because both tta and tt1 (the source of the definition) have been loaded.

@sir4ur0n
Copy link
Collaborator

@TomMD don't worry, I was well-aware of this limitation!

I just tested on an empty project and indeed, cross component (from a test to a main component) seems to work fine.

Maybe this doesn't work on our project because we see some typecheck errors (which I will report in other issues, because compilation in shell works just fine)? Could this impact navigation?

@fendor
Copy link
Collaborator

fendor commented Jun 25, 2020

@sir4ur0n

Maybe this doesn't work on our project because we see some typecheck errors

Yeah, that could be a problem

@akshaymankar
Copy link
Contributor

This only works for me if I the language server uses cabal, it doesn't work with stack.

@jneira
Copy link
Member

jneira commented Sep 24, 2020

@sir4ur0n @akshaymankar @backuitist Maybe we should close this one as too generic and open new issues it it does not work for some cases, as the navigation between components should work.

@jneira jneira closed this as completed Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants