-
Notifications
You must be signed in to change notification settings - Fork 90
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
[Documentation] new project setup #490
Comments
hi @KristianBalaj, thanks for your report. This plugin is closely related with the haskell-language-server, the lsp server which provides almost all features. There we can read:
So maybe we should make more discoverable the server docs from the extension. Otoh does your project not work if you dont have that |
The repo of haskell-language-server is linked in the first paragraph but what could we add in the readme to make clearer the association? |
Yup, the plugin was not working for me until I've added the
Yeah, It didn't even come to me, to go to that link. The first setup I've done was searching through different Haskell repos and trying to add different configurations that I've found in the repos 😄 ProposalIn my opinion, I would move the
And for someone who needs more configuration options, I would explicitly link the most important sections in the haskell-language-server repo. |
As stated in the hls docs the unique issue a explicit hie.yaml it is supposed to fix is the Could you reproduce the error consistently deleting the
Many thanks for suggesions, they make sense. Would you like and have time to make a pr following them? |
@jneira after deleting the Fyi. the haskell has a clean install from yesterday via ghcup. ghcup tui┌─────────────────────────────────────GHCup────────────────────────────────────┐
│ Tool Version Tags Notes │
│──────────────────────────────────────────────────────────────────────────────│
│✔✔ GHCup 0.1.17.2 latest,recommended │
│──────────────────────────────────────────────────────────────────────────────│
│✔✔ Stack 2.7.3 latest,recommended │
│──────────────────────────────────────────────────────────────────────────────│
│✔✔ HLS 1.4.0 latest,recommended │
│✗ HLS 1.3.0 │
│──────────────────────────────────────────────────────────────────────────────│
│✗ cabal 3.6.2.0 latest │
│✔✔ cabal 3.4.1.0 recommended │
│──────────────────────────────────────────────────────────────────────────────│
│✗ GHC 9.2.0.20210821 prerelease,base-4.16.0.0 │
│✗ GHC 9.0.1 latest,base-4.15.0.0 hls-powered │
│✔✔ GHC 8.10.7 recommended,base-4.14.3.0 hls-powered │
│✗ GHC 8.8.4 base-4.13.0.0 hls-powered │
│✗ GHC 8.6.5 base-4.12.0.0 hls-powered │
│✗ GHC 8.4.4 base-4.11.1.0 │
│ │
│ │
└──────────────────────────────────────────────────────────────────────────────┘ haskell-language-server-wrapper -dNo 'hie.yaml' found. Try to discover the project type!
Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 1.4.0.0, Git revision 253547816ee216c53ee7dacc0ad3cac43e863d30 (dirty) x86_64 ghc-8.10.4
Current directory: /Users/kristian/Documents/Kristian/haskell/vocabulary_proj
Operating system: darwin
Arguments: ["-d"]
Cradle directory: /Users/kristian/Documents/Kristian/haskell/vocabulary_proj
Cradle type: Cabal
Tool versions found on the $PATH
cabal: 3.4.1.0
stack: 2.7.3
ghc: 8.10.7
Consulting the cradle to get project GHC version...
Project GHC version: 8.10.7
haskell-language-server exe candidates: ["haskell-language-server-8.10.7","haskell-language-server"]
Launching haskell-language-server exe at:/Users/kristian/.ghcup/bin/haskell-language-server-8.10.7
haskell-language-server version: 1.4.0.0 (GHC: 8.10.7) (PATH: /Users/kristian/.ghcup/bin/haskell-language-server-8.10.7~1.4.0) (GIT hash: 253547816ee216c53ee7dacc0ad3cac43e863d30)
ghcide setup tester in /Users/kristian/Documents/Kristian/haskell/vocabulary_proj.
Report bugs at https://github.com/haskell/haskell-language-server/issues
Step 1/4: Finding files to test in /Users/kristian/Documents/Kristian/haskell/vocabulary_proj
Found 1 files
Step 2/4: Looking for hie.yaml files that control setup
Found 1 cradle
()
Step 3/4: Initializing the IDE
2021-10-25 11:12:42.074105 [ThreadId 7] DEBUG hls: Initializing exports map from hiedb
2021-10-25 11:12:42.076003 [ThreadId 7] DEBUG hls: Done initializing exports map from hiedb (8)
Step 4/4: Type checking the files
2021-10-25 11:12:42.758878 [ThreadId 42] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/Users/kristian/Documents/Kristian/haskell/vocabulary_proj/src/Main.hs"
2021-10-25 11:12:42.760078 [ThreadId 44] INFO hls: Consulting the cradle for "src/Main.hs"
2021-10-25 11:12:42.760209 [ThreadId 44] WARNING hls: No [cradle](https://github.com/mpickering/hie-bios#hie-bios) found for src/Main.hs.
Proceeding with [implicit cradle](https://hackage.haskell.org/package/implicit-hie).
You should ignore this message, unless you see a 'Multi Cradle: No prefixes matched' error.
Output from setting up the cradle Cradle {cradleRootDir = "/Users/kristian/Documents/Kristian/haskell/vocabulary_proj", cradleOptsProg = CradleAction: Cabal}
2021-10-25 11:12:42.770033 [ThreadId 44] DEBUG hls: Session loading result: Left [CradleError {cradleErrorDependencies = [], cradleErrorExitCode = ExitSuccess, cradleErrorStderr = ["Multi Cradle: No prefixes matched","pwd: /Users/kristian/Documents/Kristian/haskell/vocabulary_proj","filepath: /Users/kristian/Documents/Kristian/haskell/vocabulary_proj/src/Main.hs","prefixes:","(\"app/Main.hs\",Cabal {component = Just \"vocabulary-proj:exe:vocabulary-proj\"})"]}]
2021-10-25 11:12:42.771114 [ThreadId 41] INFO hls: File: /Users/kristian/Documents/Kristian/haskell/vocabulary_proj/src/Main.hs
Hidden: no
Range: 1:1-2:1
Source: cradle
Severity: DsError
Message:
Multi Cradle: No prefixes matched
pwd: /Users/kristian/Documents/Kristian/haskell/vocabulary_proj
filepath: /Users/kristian/Documents/Kristian/haskell/vocabulary_proj/src/Main.hs
prefixes:
("app/Main.hs",Cabal {component = Just "vocabulary-proj:exe:vocabulary-proj"})
2021-10-25 11:12:42.772206 [ThreadId 54] INFO hls: finish: User TypeCheck (took 0.01s)
2021-10-25 11:12:42.772413 [ThreadId 57] INFO hls: finish: GetHie (took 0.00s)
Files that failed:
* /Users/kristian/Documents/Kristian/haskell/vocabulary_proj/src/Main.hs
Completed (0 files worked, 1 file failed)
2021-10-25 11:12:42.772506 [ThreadId 59] INFO hls: finish: GenerateCore (took 0.00s)
haskell-language-server-wrapper: callProcess: /Users/kristian/.ghcup/bin/haskell-language-server-8.10.7 "-d" (exit 1): failed |
hmm could you share your .cabal file? |
Actually i am not sure of this one: if you already are sure you want the extension cause you has used it maybe you want to know how to make it work first. If requirements continue to be short, features would be still visible but if we extends it they will be out of the visible area.
Totally agree in those ones |
In the rust extension i can see the features in the first place (without demos) and the quick start in a second position, out of the visible area in my screen. I use rust as example cause it is a relatively less popular language like haskell and we usually use it as model in other areas (f.e. rustup was the main inspiration for ghcup). |
Sure! Here it goes Cabal file
Note 1Sorry, tried the intellisense again, it is actually not working ✋ |
mmm I think the cause of the issue is the duplicate |
Yeah sure, it's your choice. I agree that extending the requirements will make the features invisible. But you could at least add a link to the requirements above the features to highlight it. |
Yup my bad, it's working now. One related issue to the project setupWhen I make the |
if you open a file instead a directory hls will not use cabal to load the file but directly ghc so it needs it in PATH (as noted in the requirements) |
If that is the case maybe you have to source you |
Yeah I have all the things on my PATH. I'm using MacOS. The reproduction steps to the mentioned issue are:
This actually doesn't happen when the |
hmm interesting, do you see some diff in the |
Well, I've tried this mupltiple times but this issue looks somehow non-deterministic 😄 The error notification is displayed non-deterministically. There is no difference between the projects from my point of view. In case you would like to see some logs, do not hesitate to ping me. It is in my interest to make the plugin work cleanly. |
Thanks for checking it, maybe it worths to open a new issue about (and left this one for docs improvements about getting started) here or in the hls repo as i am not sure if the issue is client or server specific. The haskell lsp logs (in the output pane of vscode) from both cases will help too. |
@jneira I was going to open up an issue regarding the missing GHC popup. When I was digging into the issue deeper I've found out that I was starting the VS Code from a EDIT: I was wrong once again, I was actually opening it from the correct shell. Opening the issue. |
It is hard to find out how to make the plugin work for a beginner.
I needed to check out my previous projects to find out that I need to create a
hie.yaml
file with following lines to make the plugin work.This should be written in the plugin documentation.
The text was updated successfully, but these errors were encountered: