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

Reference to definition on other module highlighted with red squiggly #2058

Closed
dharmatech opened this issue Aug 1, 2021 · 4 comments
Closed
Labels
build tool: stack component: ghcide status: needs info Not actionable, because there's missing information type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@dharmatech
Copy link

Originally posted on stackoverflow:

https://stackoverflow.com/q/68607694/268581

Here's a video demonstrating the issue:

https://youtu.be/8NLn1YsKuwM

Your environment

Output of haskell-language-server --probe-tools or haskell-language-server-wrapper --probe-tools:

I'm using stack under WSL on Windows 10. From where should I run haskell-language-server?

Which OS do you use:
Windows
Which lsp-client do you use:
vscode

Here's some debug output I captured after turning on tracing for the Haskell vscode extension:

https://pastebin.com/hGtJMiC7

@Ailrun
Copy link
Member

Ailrun commented Aug 2, 2021

This one is probably because they are in different sections in the cabal file (I guess your Main module is for executable and Lib module is for library), not because they are in different modules.

This is possibly a duplicated of #1822

Related issue: #735

@Ailrun Ailrun added the status: needs info Not actionable, because there's missing information label Aug 2, 2021
@jneira jneira added component: ghcide type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. build tool: stack labels Aug 2, 2021
@jneira
Copy link
Member

jneira commented Aug 2, 2021

@dharmatech many thanks for reporting the issue providing all the necessary info we ask for.
Like @Ailrun, i think this seems to be a duplicated of #1822. Gonna close this one, @dharmatech feel free to reopen if you think your issue differs in some way

@jneira jneira closed this as completed Aug 2, 2021
@dharmatech
Copy link
Author

dharmatech commented Aug 2, 2021

@Ailrun,

This one is probably because they are in different sections in the cabal file (I guess your Main module is for executable and Lib module is for library), not because they are in different modules.

Yup, that's exactly right! I've included the cabal file below.

This is possibly a duplicated of #1822

Related issue: #735

Thank you! I will follow those.

cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.34.4.
--
-- see: https://github.com/sol/hpack

name:           vscode-red-squiggly-test
version:        0.1.0.0
description:    Please see the README on GitHub at <https://github.com/githubuser/vscode-red-squiggly-test#readme>
homepage:       https://github.com/githubuser/vscode-red-squiggly-test#readme
bug-reports:    https://github.com/githubuser/vscode-red-squiggly-test/issues
author:         Author name here
maintainer:     [email protected]
copyright:      2021 Author name here
license:        BSD3
license-file:   LICENSE
build-type:     Simple
extra-source-files:
    README.md
    ChangeLog.md

source-repository head
  type: git
  location: https://github.com/githubuser/vscode-red-squiggly-test

library
  exposed-modules:
      Lib
  other-modules:
      Paths_vscode_red_squiggly_test
  hs-source-dirs:
      src
  build-depends:
      base >=4.7 && <5
  default-language: Haskell2010

executable vscode-red-squiggly-test-exe
  main-is: Main.hs
  other-modules:
      Paths_vscode_red_squiggly_test
  hs-source-dirs:
      app
  ghc-options: -threaded -rtsopts -with-rtsopts=-N
  build-depends:
      base >=4.7 && <5
    , vscode-red-squiggly-test
  default-language: Haskell2010

test-suite vscode-red-squiggly-test-test
  type: exitcode-stdio-1.0
  main-is: Spec.hs
  other-modules:
      Paths_vscode_red_squiggly_test
  hs-source-dirs:
      test
  ghc-options: -threaded -rtsopts -with-rtsopts=-N
  build-depends:
      base >=4.7 && <5
    , vscode-red-squiggly-test
  default-language: Haskell2010

@dharmatech
Copy link
Author

Like @Ailrun, i think this seems to be a duplicated of #1822. Gonna close this one, @dharmatech feel free to reopen if you think your issue differs in some way

Thanks @jneira! I will follow that one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build tool: stack component: ghcide status: needs info Not actionable, because there's missing information 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