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

"cannot satisfy -package-id" error on startup #185

Closed
KeeVeeGames opened this issue Jan 2, 2020 · 17 comments
Closed

"cannot satisfy -package-id" error on startup #185

KeeVeeGames opened this issue Jan 2, 2020 · 17 comments

Comments

@KeeVeeGames
Copy link

  • Windows 10
  • VS Code 1.41.1
  • Stack 2.1.3
  • GHC 8.6.5
  • Cabal 2.4.1.0

Creating new project with:

stack new test-project
stack setup

After opening VS Code, the error appears:
"cannot satisfy -package-id test-project-0.1.0.0-Cmv2I2cNFPDBukExjBMTyM\n (use -v for more information)"

Output when I try mannualy open HIE in the project folder: https://pastebin.com/QWYSpPkv

"Troubleshooting" section in the HIE and other issues with this error around here does not hellp.

Thanks.

@alanz
Copy link
Collaborator

alanz commented Jan 2, 2020

This is a problem from latest hie master, which re-introduced the --lsp flag. It will be fixed imminently, with a new release of this plugin.

@alanz
Copy link
Collaborator

alanz commented Jan 2, 2020

And version 0.0.32 is now on the market.

@KeeVeeGames
Copy link
Author

Now I get this:

The Haskell HIE (test-project) server crashed 5 times in the last 3 minutes. The server will not be restarted.

@KeeVeeGames
Copy link
Author

KeeVeeGames commented Jan 2, 2020

Got this in the log file:

Invalid option `--lsp'

Usage: hie-wrapper [--version] [--help] [--numeric-version] [--compiler]
                   [-d|--debug] [-l|--logfile LOGFILE] [--lsp]
                   [-r|--project-root PROJECTROOT] ([--bios-verbose] |
                   [--vomit]) [-c|--capture CAPTUREFILE] [--example]
[Info  - 23:52:34] Connection to server got closed. Server will restart.

@alanz
Copy link
Collaborator

alanz commented Jan 2, 2020

How did you install? it looks like you are running an older version of hie-wrapper.

@KeeVeeGames
Copy link
Author

I built it from sources accorcding to "Installation" guide.
I re-cloned the repo and built hie again, but got the same results.

The interseting thing is when I try to mannualy start hie-wrapper in the project dir with the --lsp it seems to understand this flag: https://pastebin.com/6BZ544K6

🤔

@KeeVeeGames
Copy link
Author

KeeVeeGames commented Jan 3, 2020

I made a custom wrapper with this batch command:
hie-wrapper --lsp -d

And it doesn't show any errors anymore, but it still doesn't work: not showing any hlint suggestions or hover tooltips.

Here is the output I got from that: https://pastebin.com/fmnLk1jb

@alanz
Copy link
Collaborator

alanz commented Jan 3, 2020

I think the critical part of the log is

2020-01-03 14:46:04.7003751 [ThreadId 3] - Cabal-Helper dirs: ["c:\\Projects\\Haskell\\test-project","c:\\Projects\\Haskell\\test-project\\File.hs"]
'stty' is not recognized as an internal or external command,
operable program or batch file.
'stty' is not recognized as an internal or external command,
operable program or batch file.
'stty' is not recognized as an internal or external command,
operable program or batch file.
2020-01-03 14:46:05.7253733 [ThreadId 3] - Cabal-Helper cradle package: Package {pPackageName = "test-project", pSourceDir = "

@KeeVeeGames
Copy link
Author

KeeVeeGames commented Jan 3, 2020

You mean the 'stty' part? Do you have any idea how to fix that?

And I suppose the problem with the standard wrapper should also be fixed somehow?

@KeeVeeGames
Copy link
Author

I found a 'stty' tool in the %localappdata%\Programs\stack\x86_64-windows\msys2-20180531\usr\bin and added this to an environment paths.

After that 'stty' is not recognized line place was taken by the stty: 'standard input': Inappropriate ioctl for device. And still nothing works.

@alanz
Copy link
Collaborator

alanz commented Jan 3, 2020

Ping @jneira, I think this may be a windows thing somehow.

@jneira
Copy link
Member

jneira commented Jan 4, 2020

Hi! The stty thing is disturbing but it should not break the execution. Nevertheless there is a workaround to remove it from the output.
@KeeVeeGames if you run stack build in a console within the project dir root, does the command success? Could you attach the log opening a .hs file and making hover on a definition for example?

@jneira
Copy link
Member

jneira commented Jan 4, 2020

I made a custom wrapper with this batch command:
hie-wrapper --lsp -d

You can use the vscode extension option "languageServerHaskell.hieExecutablePath": "X:\path\to\hie.exe" to get he same behaviour (bypass the hie-wrapper).

@KeeVeeGames In fact i would use it to check if it fixes the issue.

@KeeVeeGames
Copy link
Author

KeeVeeGames commented Jan 4, 2020

@jneira thank you for joining.

stack build succeed, compiled program is working.

The output stops on the

2020-01-04 13:47:08.1276971 [ThreadId 37] - ideDispatcher: top of loop
2020-01-04 13:47:08.1386964 [ThreadId 36] - ghcDispatcher: top of loop

lines and nothing changes no matter if I hover something,

@KeeVeeGames
Copy link
Author

KeeVeeGames commented Jan 4, 2020

I tried the method with this hieExecutablePath option and got different results.

When I first started vscode with wrapper bypass it was showing me the cannot satisfy -package-id error (like from the beginning) every time I tired to hover something. Also producing this ouput: https://pastebin.com/zq0VGe85

But after restart it starts working fine, showing me hlint suggections and hover tips, output also seems alright. I tried to restart vscode several times more but never got a cannot satify error again.

@jneira
Copy link
Member

jneira commented Jan 4, 2020

@KeeVeeGames A new version of the extension 0.34 has been released and it should fix the issue without setting any option, so you could reset the languageServerHaskell.hieExecutablePath extension option.
Thanks for reporting and provide info to help fix it.

@KeeVeeGames
Copy link
Author

It's fixed now, thank you.

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

3 participants