Skip to content

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

@amano-kenji

Description

@amano-kenji

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: ghcidemulti-componentIssues relating to multi-component supporttype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions