Skip to content

Jumping to definition in beam-core from beam-sqlite results in errors. #3442

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
amano-kenji opened this issue Jan 7, 2023 · 2 comments
Closed
Labels
component: ghcide multi-component Issues relating to multi-component support type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@amano-kenji
Copy link

amano-kenji commented Jan 7, 2023

Your environment

Which OS do you use?
Gentoo Linux

Which version of GHC do you use and how did you install it?
9.0.2 from Gentoo Linux

How is your project built (alternative: link to the project)?
https://github.com/haskell-beam/beam

Which LSP client (editor/plugin) do you use?
nvim-lspconfig

Which version of HLS do you use and how did you install it?
1.9.0.0 from Gentoo Linux

Have you configured HLS in any way (especially: a hie.yaml file)?
hie.yaml

cradle:
  cabal:

Steps to reproduce

  • Open beam-sqlite/Database/Beam/Sqlite/Syntax.hs in neovim with nvim-lspconfig
  • Find IsSql99DataTypeSyntax in Syntax.hs
  • Jump to definition of IsSql99DataTypeSyntax in beam-core
  • Come back to Syntax.hs of beam-sqlite by pressing Ctrl+O
  • You can see errors in Syntax.hs
  • Find IsSql92DdlCommandSyntax in Syntax.hs
  • Jump to definition of IsSql92DdlCommandSyntax in beam-migrate
  • Come back to Syntax.hs of beam-sqlite by pressing Ctrl+O
  • The errors are gone.

Expected behaviour

No error

Actual behaviour

Diagnostics:
1. • No instance for (Database.Beam.Backend.SQL.SQL92.IsSql92TableNameSyntax
                        SqliteTableNameSyntax)
       arising from the superclasses of an instance declaration
   • In the instance declaration for
       ‘IsSql92DropTableSyntax SqliteDropTableSyntax’

and various other errors.

I can avoid the error by visiting beam-migrate from beam-sqlite before visiting beam-core from beam-sqlite.
If I visited beam-core from beam-sqlite, then the errors can be eliminated by visiting beam-migrate from beam-sqlite.

@amano-kenji amano-kenji added status: needs triage type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. labels Jan 7, 2023
@fendor
Copy link
Collaborator

fendor commented Feb 22, 2023

This is caused by our custom support for multiple home units and might be fixed eventually if #3502 together with some other PRs lands.

@michaelpj michaelpj added the multi-component Issues relating to multi-component support label Jan 17, 2024
@michaelpj
Copy link
Collaborator

This should be fixed with the new multi-component support.

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

No branches or pull requests

3 participants