Skip to content

Wingman/"Case split": Exception: [...]/share/hyph-en-us.hyp.txt.gz: openBinaryFile: does not exist (No such file or directory) #2015

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
runeksvendsen opened this issue Jul 13, 2021 · 3 comments
Labels
component: wingman type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@runeksvendsen
Copy link
Contributor

Your environment

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

haskell-language-server version: 1.2.0.0 (GHC: 8.10.4) (PATH: /Users/rune/Library/Application Support/Code/User/globalStorage/haskell.haskell/haskell-language-server-wrapper-1.2.0-darwin) (GIT hash: be2071e985cb417f984ab00a1aad76dee02d6d0b)
Tool versions found on the $PATH
cabal:          3.4.0.0
stack:          2.5.1
ghc:            8.10.4
Which OS do you use:

MacOS

Which lsp-client do you use:

VS Code

Describe your project (alternative: link to the project):

https://github.com/obsidiansystems/cardano-node/

Contents of `hie.yaml`
cradle:
  cabal:
    - path: "cardano-api/src"
      component: "lib:cardano-api"

    - path: "cardano-api/test"
      component: "cardano-api:test:cardano-api-test"

    - path: "cardano-api/test/./"
      component: "lib:cardano-api-test"

    - path: "cardano-submit-api/src"
      component: "lib:cardano-submit-api"

    - path: "cardano-cli/src"
      component: "lib:cardano-cli"

    - path: "cardano-cli/app/cardano-cli.hs"
      component: "cardano-cli:exe:cardano-cli"

    - path: "cardano-cli/test"
      component: "cardano-cli:test:cardano-cli-test"

    - path: "cardano-cli/test"
      component: "cardano-cli:test:cardano-cli-golden"

    - path: "cardano-client-demo/./ScanBlocks.hs"
      component: "cardano-client-demo:exe:scan-blocks"

    - path: "cardano-config/src"
      component: "lib:cardano-config"

    - path: "cardano-node/src"
      component: "lib:cardano-node"

    - path: "cardano-node/app/cardano-node.hs"
      component: "cardano-node:exe:cardano-node"

    - path: "cardano-node/app/Paths_cardano_node.hs"
      component: "cardano-node:exe:cardano-node"

    - path: "cardano-node/test"
      component: "cardano-node:test:cardano-node-test"

    - path: "cardano-node-chairman/app/cardano-node-chairman.hs"
      component: "cardano-node-chairman:exe:cardano-node-chairman"

    - path: "cardano-node-chairman/app/Cardano/Chairman.hs"
      component: "cardano-node-chairman:exe:cardano-node-chairman"

    - path: "cardano-node-chairman/app/Cardano/Chairman/Commands.hs"
      component: "cardano-node-chairman:exe:cardano-node-chairman"

    - path: "cardano-node-chairman/app/Cardano/Chairman/Commands/Version.hs"
      component: "cardano-node-chairman:exe:cardano-node-chairman"

    - path: "cardano-node-chairman/app/Cardano/Chairman/Commands/Run.hs"
      component: "cardano-node-chairman:exe:cardano-node-chairman"

    - path: "cardano-node-chairman/app/Paths_cardano_node_chairman.hs"
      component: "cardano-node-chairman:exe:cardano-node-chairman"

    - path: "cardano-node-chairman/test"
      component: "cardano-node-chairman:test:chairman-tests"

    - path: "cardano-node-chairman/testnet/Main.hs"
      component: "cardano-node-chairman:exe:cardano-testnet"

    - path: "cardano-node-chairman/testnet/Paths_cardano_node_chairman.hs"
      component: "cardano-node-chairman:exe:cardano-testnet"

    - path: "cardano-node-chairman/testnet/Testnet/Commands.hs"
      component: "cardano-node-chairman:exe:cardano-testnet"

    - path: "cardano-node-chairman/testnet/Testnet/Commands/Byron.hs"
      component: "cardano-node-chairman:exe:cardano-testnet"

    - path: "cardano-node-chairman/testnet/Testnet/Commands/ByronShelley.hs"
      component: "cardano-node-chairman:exe:cardano-testnet"

    - path: "cardano-node-chairman/testnet/Testnet/Commands/Shelley.hs"
      component: "cardano-node-chairman:exe:cardano-testnet"

    - path: "cardano-node-chairman/testnet/Testnet/Commands/Version.hs"
      component: "cardano-node-chairman:exe:cardano-testnet"

    - path: "cardano-node-chairman/testnet/Testnet/Run.hs"
      component: "cardano-node-chairman:exe:cardano-testnet"

    - path: "hedgehog-extras/src"
      component: "lib:hedgehog-extras"

Steps to reproduce

  1. Navigate to the file cardano-api/src/Cardano/Api/ProtocolParameters.hs.
  2. At the bottom of the file, add the code below
  3. Hover over the hole and select "Introduce lambda"
  4. Hover over the hole and select "Case split on up"
lol :: UpdateProposal -> ()
lol = _

Expected behaviour

Case splitting on up

Actual behaviour

Nothing happens. The following error appears in the logs:

2021-07-13 17:13:02.045531 [ThreadId 620398] ERROR hls:	Unexpected exception on request, please report!
Exception: /Users/runner/.cabal/store/ghc-8.10.4/hyphntn-0.8.1-ca9bb3eb/share/hyph-en-us.hyp.txt.gz: openBinaryFile: does not exist (No such file or directory)
[Error - 5:13:02 PM] Request workspace/executeCommand failed.
  Message: /Users/runner/.cabal/store/ghc-8.10.4/hyphntn-0.8.1-ca9bb3eb/share/hyph-en-us.hyp.txt.gz: openBinaryFile: does not exist (No such file or directory)
  Code: -32603 

All log lines that appear after selecting "Case split on up":

2021-07-13 17:13:01.974445 [ThreadId 620401] INFO hls:	finish: Wingman.judgementForHole.GetHieAst (took 0.00s)
2021-07-13 17:13:01.974663 [ThreadId 620403] INFO hls:	finish: Wingman.judgementForHole.GetBindings (took 0.00s)
2021-07-13 17:13:01.974869 [ThreadId 620405] INFO hls:	finish: Wingman.judgementForHole.TypeCheck (took 0.00s)
2021-07-13 17:13:01.975079 [ThreadId 620407] INFO hls:	finish: Wingman.judgementForHole.GhcSessionDeps (took 0.00s)
2021-07-13 17:13:01.975636 [ThreadId 620409] INFO hls:	finish: Wingman.getIdeDynflags.GetModSummaryWithoutTimestamps (took 0.00s)
2021-07-13 17:13:01.975824 [ThreadId 620411] INFO hls:	finish: Wingman.tacticCmd.GetAnnotatedParsedSource (took 0.00s)
2021-07-13 17:13:01.97603 [ThreadId 620413] INFO hls:	finish: Wingman.getParserState.TypeCheck (took 0.00s)
2021-07-13 17:13:01.976174 [ThreadId 620415] INFO hls:	finish: Wingman.getParserState.GhcSessionDeps (took 0.00s)
2021-07-13 17:13:02.045531 [ThreadId 620398] ERROR hls:	Unexpected exception on request, please report!
Exception: /Users/runner/.cabal/store/ghc-8.10.4/hyphntn-0.8.1-ca9bb3eb/share/hyph-en-us.hyp.txt.gz: openBinaryFile: does not exist (No such file or directory)
[Error - 5:13:02 PM] Request workspace/executeCommand failed.
  Message: /Users/runner/.cabal/store/ghc-8.10.4/hyphntn-0.8.1-ca9bb3eb/share/hyph-en-us.hyp.txt.gz: openBinaryFile: does not exist (No such file or directory)
  Code: -32603 
2021-07-13 17:13:02.050745 [ThreadId 620430] INFO hls:	finish: Pragmas.GetParsedModule (took 0.00s)
2021-07-13 17:13:02.051442 [ThreadId 620438] INFO hls:	finish: Pragmas.GetFileContents (took 0.00s)
2021-07-13 17:13:02.053487 [ThreadId 620444] INFO hls:	finish: importLens (took 0.00s)
2021-07-13 17:13:02.054702 [ThreadId 620438] INFO hls:	finish: splice.codeAction.GitHieAst (took 0.00s)
2021-07-13 17:13:02.05501 [ThreadId 620438] INFO hls:	finish: retrie (took 0.00s)
2021-07-13 17:13:02.055101 [ThreadId 620444] INFO hls:	finish: Wingman.judgementForHole.GetHieAst (took 0.00s)
2021-07-13 17:13:02.055136 [ThreadId 620442] INFO hls:	finish: GhcideCodeActions.GetFileContents (took 0.00s)
2021-07-13 17:13:02.054506 [ThreadId 620446] INFO hls:	finish: RefineImports (took 0.00s)
2021-07-13 17:13:02.055619 [ThreadId 620440] INFO hls:	finish: GhcideCodeActions.GetGlobalBindingTypeSigs (took 0.00s)
2021-07-13 17:13:02.056139 [ThreadId 620455] INFO hls:	finish: GhcideCodeActions.TypeCheck (took 0.00s)
2021-07-13 17:13:02.056033 [ThreadId 620451] INFO hls:	finish: GhcideCodeActions.GetAnnotatedParsedSource (took 0.00s)
2021-07-13 17:13:02.056291 [ThreadId 620449] INFO hls:	finish: GhcideCodeActions.GhcSession (took 0.00s)
2021-07-13 17:13:02.056206 [ThreadId 620436] INFO hls:	finish: HaddockComments.GetAnnotatedParsedSource (took 0.01s)
2021-07-13 17:13:02.056334 [ThreadId 620453] INFO hls:	finish: Wingman.judgementForHole.GetBindings (took 0.00s)
2021-07-13 17:13:02.056545 [ThreadId 620457] INFO hls:	finish: GhcideCodeActions.GetBindings (took 0.00s)
2021-07-13 17:13:02.056759 [ThreadId 620459] INFO hls:	finish: Wingman.judgementForHole.TypeCheck (took 0.00s)
2021-07-13 17:13:02.057896 [ThreadId 620461] INFO hls:	finish: GhcideCodeActions.GetAnnotatedParsedSource (took 0.00s)
2021-07-13 17:13:02.057992 [ThreadId 620463] INFO hls:	finish: Wingman.judgementForHole.GhcSessionDeps (took 0.00s)
2021-07-13 17:13:02.058275 [ThreadId 620467] INFO hls:	finish: GhcideCodeActions.GetParsedModule (took 0.00s)
2021-07-13 17:13:02.058178 [ThreadId 620465] INFO hls:	finish: GhcideCodeActions.getIdeOptions (took 0.00s)
2021-07-13 17:13:02.058508 [ThreadId 620471] INFO hls:	finish: Wingman.getIdeDynflags.GetModSummaryWithoutTimestamps (took 0.00s)
2021-07-13 17:13:02.058593 [ThreadId 620469] INFO hls:	finish: GhcideCodeActions.GetParsedModule (took 0.00s)
2021-07-13 17:13:02.058724 [ThreadId 620472] INFO hls:	finish: GhcideCodeActions.GetParsedModule (took 0.00s)
2021-07-13 17:13:02.058785 [ThreadId 620461] INFO hls:	finish: GhcideCodeActions.GetFileContents (took 0.00s)
2021-07-13 17:13:02.05885 [ThreadId 620463] INFO hls:	finish: GhcideCodeActions.GetAnnotatedParsedSource (took 0.00s)
2021-07-13 17:13:02.059131 [ThreadId 620473] INFO hls:	finish: GhcideCodeActions.GetFileContents (took 0.00s)
2021-07-13 17:13:02.064631 [ThreadId 620474] INFO hls:	finish: GhcideCodeActions.TypeCheck (took 0.00s)
2021-07-13 17:13:02.064724 [ThreadId 620476] INFO hls:	finish: GhcideCodeActions.GetHieAst (took 0.00s)
2021-07-13 17:13:02.07021 [ThreadId 620478] INFO hls:	finish: GhcideCodeActions.getParsedModule (took 0.00s)

Include debug information

Execute in the root of your project the command haskell-language-server --debug . and paste the logs here:

Debug output:
$ /Users/rune/Library/Application\ Support/Code/User/globalStorage/haskell.haskell/haskell-language-server-wrapper-1.2.0-darwin --debug .   
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper-1.2.0-darwin) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--debug","."]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:          3.4.0.0
stack:          2.5.1
ghc:            8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Cannot find any haskell-language-server exe, looked for: haskell-language-server-8.10.4, haskell-language-server

Paste the logs from the lsp-client, e.g. for VS Code

LSP logs: https://gist.github.com/runeksvendsen/6916cdaa467e47d2a37bc6abff952cf7

@Tarmean
Copy link

Tarmean commented Jul 13, 2021

The current release is missing the hyphenation data, I don't think there is a release with this fix yet. #1976

If you don't want to wait for the next release or build yourself, putting the data in the correct location by hand seems to work https://github.com/ekmett/hyphenation/tree/master/data

@jneira jneira added component: wingman type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. status: fixed in master labels Jul 13, 2021
@bradrn
Copy link
Contributor

bradrn commented Aug 3, 2021

Is this fixed in 1.3.0? If so someone should close this.

@jneira
Copy link
Member

jneira commented Aug 3, 2021

@bradrn it should be fixed, yeah, thanks for noting it
@runeksvendsen gonna close it optimistically, feel free to reopen if you continue experiencing the bug in 1.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: wingman 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

4 participants