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

Haskelly choosing wrong workDir? #98

Open
aryairani opened this issue May 22, 2019 · 2 comments
Open

Haskelly choosing wrong workDir? #98

aryairani opened this issue May 22, 2019 · 2 comments

Comments

@aryairani
Copy link

Not sure if the problem in the subject is the reason why Jump to Definition and type hovers don't work, but it seemed plausible?

My stack project is in /Users/arya/unison, but the log below seems to be looking in /Users/arya/unison/yaks/haskeline, which is a sub-package.

Also, if I press the Stack Build button, it runs stack it in /Users/arya/unison/yaks/haskeline when I want it to be running in /Users/arya/unison (where my stack.yaml is; also the directory I opened in VS Code).

Thanks in advance!

[Extension Host] Trying new Intero for document /Users/arya/unison/parser-typechecker/src/Unison/Codebase/Causal2.hs and workDir /Users/arya/unison/yaks/haskeline/
---
workbench.main.js:1402   ERR Cannot read property 'slice' of null: TypeError: Cannot read property 'slice' of null
	at InteroLocationDecoder.extractRange (/Users/arya/.vscode/extensions/ucl.haskelly-0.5.5/out/src/Providers/InteroLocationDecoder.js:24:13)
	at InteroLocationDecoder.buildLocation (/Users/arya/.vscode/extensions/ucl.haskelly-0.5.5/out/src/Providers/InteroLocationDecoder.js:11:28)
	at InteroLocationDecoder.decode (/Users/arya/.vscode/extensions/ucl.haskelly-0.5.5/out/src/Providers/InteroLocationDecoder.js:6:21)
	at HaskellDefinitionProvider.<anonymous> (/Users/arya/.vscode/extensions/ucl.haskelly-0.5.5/out/src/Providers/Definition/index.js:24:47)
	at Generator.next (<anonymous>)
	at fulfilled (/Users/arya/.vscode/extensions/ucl.haskelly-0.5.5/out/src/Providers/Definition/index.js:4:58)
@aryairani
Copy link
Author

Okay, here is the output of stack query; I guess getWorkDir should expect multiple matches in its regexp and choose the one that is a prefix of dirname(filepath)? I would try this, but I don't know how to install a custom build into VSCode.

$ ▶ stack query
compiler:
  wanted: ghc-8.4.3
  actual: ghc-8.4.3
# Note: global-hints is experimental and may be renamed / removed in the future.
# See https://github.com/commercialhaskell/stack/issues/3796
global-hints:
  ghc: 8.4.3
  bytestring: 0.10.8.2
  unix: 2.7.2.2
  base: 4.11.1.0
  time: 1.8.0.2
  hpc: 0.6.0.3
  filepath: 1.4.2
  process: 1.6.3.0
  array: 0.5.2.0
  integer-gmp: 1.0.2.0
  containers: 0.5.11.0
  ghc-boot: 8.4.3
  binary: 0.8.5.1
  ghc-prim: 0.5.2.0
  ghci: 8.4.3
  rts: '1.0'
  terminfo: 0.4.1.1
  transformers: 0.5.5.0
  deepseq: 1.4.3.0
  ghc-boot-th: 8.4.3
  pretty: 1.1.3.6
  template-haskell: 2.13.0.0
  directory: 1.3.1.5
locals:
  haskeline:
    path: /Users/arya/unison/yaks/haskeline/
    version: 0.7.5.0
  easytest:
    path: /Users/arya/unison/yaks/easytest/
    version: '0.1'
  unison-parser-typechecker:
    path: /Users/arya/unison/parser-typechecker/
    version: '0.1'

@aryairani
Copy link
Author

Maybe something like this:

https://repl.it/@aryairani/workDirExample

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant