Closed dewijones92 closed 2 years ago
I'm not sure I understand the problem:
$ stack new helloworld new-template
Downloading template "new-template" to create project "helloworld" in helloworld/ ...
The following parameters were needed by the template but not provided: category
You can provide them in /Users/ur20980/.stack/config.yaml, like this:
templates:
params:
category: value
Or you can pass each one as parameters like this:
stack new helloworld new-template -p "category:value"
Looking for .cabal or package.yaml files to use to init the project.
Using cabal packages:
- helloworld/
Selecting the best among 21 snapshots...
* Matches https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/19/12.yaml
Selected resolver: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/19/12.yaml
Initialising configuration using resolver: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/19/12.yaml
Total number of user packages considered: 1
Writing configuration to file: helloworld/stack.yaml
All done.
/Users/ur20980/.stack/templates/new-template.hsfiles: 6.06 KiB downloaded...
$ cd helloworld
$ stack build
Building all executables for `helloworld' once. After a successful build of all of them, only specified executables will be rebuilt.
helloworld> configure (lib + exe)
Configuring helloworld-0.1.0.0...
helloworld> build (lib + exe)
Preprocessing library for helloworld-0.1.0.0..
Building library for helloworld-0.1.0.0..
[1 of 2] Compiling Lib
[2 of 2] Compiling Paths_helloworld
Preprocessing executable 'helloworld-exe' for helloworld-0.1.0.0..
Building executable 'helloworld-exe' for helloworld-0.1.0.0..
[1 of 2] Compiling Main
[2 of 2] Compiling Paths_helloworld
Linking .stack-work/dist/x86_64-osx/Cabal-3.4.1.0/build/helloworld-exe/helloworld-exe ...
helloworld> copy/register
Installing library in /Users/ur20980/src/tmp/helloworld/.stack-work/install/x86_64-osx/5bc4200f41495530e031a95bb7b3e67a7fc07bb9355f615275edd7563cf8e842/9.0.2/lib/x86_64-osx-ghc-9.0.2/helloworld-0.1.0.0-A2A7VUJBGTtENB3KROKHHh
Installing executable helloworld-exe in /Users/ur20980/src/tmp/helloworld/.stack-work/install/x86_64-osx/5bc4200f41495530e031a95bb7b3e67a7fc07bb9355f615275edd7563cf8e842/9.0.2/bin
Registering library for helloworld-0.1.0.0..
$ stack run
someFunc
$ haskell-language-server-wrapper -d --lsp
Found "/Users/ur20980/hie.yaml" for "/Users/ur20980/src/tmp/helloworld/a"
Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 1.7.0.0 x86_64 ghc-9.2.2
Current directory: /Users/ur20980/src/tmp/helloworld
Operating system: darwin
Arguments: ["-d","--lsp"]
Cradle directory: /Users/ur20980
Cradle type: Multi
Tool versions found on the $PATH
cabal: 3.6.2.0
stack: 2.7.5
ghc: 9.0.2
Consulting the cradle to get project GHC version...
Project GHC version: 9.0.2
haskell-language-server exe candidates: ["haskell-language-server-9.0.2","haskell-language-server"]
Launching haskell-language-server exe at:/Users/ur20980/.ghcup/bin/haskell-language-server-9.0.2
2022-06-23T03:00:13.149475Z | Info | No log file specified; using stderr.
2022-06-23T03:00:13.154066Z | Info | haskell-language-server version: 1.7.0.0 (GHC: 9.0.2) (PATH: /Users/ur20980/.ghcup/hls/1.7.0.0/lib/haskell-language-server-1.7.0.0/bin/haskell-language-server-9.0.2)
2022-06-23T03:00:13.156038Z | Info | Directory: /Users/ur20980
2022-06-23T03:00:13.156284Z | Info | Starting (haskell-language-server) LSP server...
GhcideArguments {argsCommand = LSP, argsCwd = Nothing, argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = True, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False}
PluginIds: [ pragmas
, floskell
, fourmolu
, tactics
, ormolu
, rename
, retrie
, brittany
, callHierarchy
, class
, haddockComments
, eval
, importLens
, qualifyImportedNames
, refineImports
, moduleName
, hlint
, splice
, alternateNumberFormat
, selectionRange
, changeTypeSignature
, ghcide-hover-and-symbols
, ghcide-code-actions-imports-exports
, ghcide-code-actions-type-signatures
, ghcide-code-actions-bindings
, ghcide-code-actions-fill-holes
, ghcide-completions
, ghcide-type-lenses
, ghcide-core
, LSPRecorderCallback ]
2022-06-23T03:00:13.161369Z | Info | Logging heap statistics every 60.00s
2022-06-23T03:00:13.196642Z | Info | Staring LSP server...
If you are seeing this in a terminal, you probably should have run WITHOUT the --lsp option!
MacOS 12.4, Cabal-3.6.2.0, Stack-2.7.5, GHC-9.0.2, HLS-1.7.0.0.
@mouse07410
this fixed it
adding this: system-ghc: true
Found it here https://www.reddit.com/r/haskell/comments/uk5wg7/comment/i7n990t/?utm_source=reddit&utm_medium=web2x&context=3
Your environment
Which OS do you use: Docker, Linux Which LSP client (editor/plugin) do you use: Just running it from cli
haskell-language-server-wrapper -d --lsp
Describe your project (alternative: link to the project): stack new helloworld new-template
https://github.com/dewijones92/helloworld2
Steps to reproduce
run
haskell-language-server-wrapper -d --lsp
Expected behaviour
Should start lsp server and not produce errors
Actual behaviour
Says
GHC ABIs don't match!
and quits.{"jsonrpc":"2.0", "method":"window/showMessage", "params": {"type": 1, "message": "Couldn't find a working/matching GHC installation. Consider installing ghc-9.0.2 via ghcup or build HLS from source."}}
Include debug information
I already have ghc-9.0.2 installed. So I am not sure what I am doing wrong. Help please? :)