Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

First pass at printing out debug info if started without --lsp #1538

Merged
merged 2 commits into from
Jan 2, 2020

Conversation

alanz
Copy link
Collaborator

@alanz alanz commented Jan 1, 2020

Closes #1412

Example output

Running HIE(hie)
  Version 1.0.0.0, Git revision 666626ede0e0bf5f1c876bd04f2a8a0cc68e7bb1 (dirty) (3534 commits) x86_64 ghc-8.6.5
Current directory:/home/alanz/mysrc/github/alanz/haskell-ide-engine/app

args:[]

Looking for project config cradle...

2020-01-01 22:41:46.396914848 [ThreadId 4] - Cabal-Helper dirs: ["/home/alanz/mysrc/github/alanz/haskell-ide-engine","/home/alanz/mysrc/github/alanz/haskell-ide-engine/app/File.hs"]
Resolving dependencies...
Build profile: -w ghc-8.6.5 -O1
In order, the following would be built (use -v for more details):
 - hie-plugin-api-0.14.0.0 (lib) (configuration changed)
 - haskell-ide-engine-1.0.0.0 (lib) (configuration changed)
 - haskell-ide-engine-1.0.0.0 (test:wrapper-test) (configuration changed)
 - haskell-ide-engine-1.0.0.0 (exe:hie-wrapper) (configuration changed)
 - haskell-ide-engine-1.0.0.0 (lib:hie-test-utils) (configuration changed)
 - haskell-ide-engine-1.0.0.0 (exe:hie) (configuration changed)
 - haskell-ide-engine-1.0.0.0 (test:unit-test) (configuration changed)
 - haskell-ide-engine-1.0.0.0 (test:plugin-dispatcher-test) (configuration changed)
 - haskell-ide-engine-1.0.0.0 (test:dispatcher-test) (configuration changed)
 - haskell-ide-engine-1.0.0.0 (test:func-test) (configuration changed)
Cradle:Cabal project

Example output

Running HIE(hie)
  Version 1.0.0.0, Git revision 666626e (dirty) (3534 commits) x86_64 ghc-8.6.5
Current directory:/home/alanz/mysrc/github/alanz/haskell-ide-engine/app

args:[]

Looking for project config cradle...

2020-01-01 22:41:46.396914848 [ThreadId 4] - Cabal-Helper dirs: ["/home/alanz/mysrc/github/alanz/haskell-ide-engine","/home/alanz/mysrc/github/alanz/haskell-ide-engine/app/File.hs"]
Resolving dependencies...
Build profile: -w ghc-8.6.5 -O1
In order, the following would be built (use -v for more details):
 - hie-plugin-api-0.14.0.0 (lib) (configuration changed)
 - haskell-ide-engine-1.0.0.0 (lib) (configuration changed)
 - haskell-ide-engine-1.0.0.0 (test:wrapper-test) (configuration changed)
 - haskell-ide-engine-1.0.0.0 (exe:hie-wrapper) (configuration changed)
 - haskell-ide-engine-1.0.0.0 (lib:hie-test-utils) (configuration changed)
 - haskell-ide-engine-1.0.0.0 (exe:hie) (configuration changed)
 - haskell-ide-engine-1.0.0.0 (test:unit-test) (configuration changed)
 - haskell-ide-engine-1.0.0.0 (test:plugin-dispatcher-test) (configuration changed)
 - haskell-ide-engine-1.0.0.0 (test:dispatcher-test) (configuration changed)
 - haskell-ide-engine-1.0.0.0 (test:func-test) (configuration changed)
Cradle:Cabal project
@alanz alanz requested review from mpickering, lukel97 and fendor January 1, 2020 22:49
Since it is needed once more.
Copy link
Collaborator

@lukel97 lukel97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than being the default option when no arguments are passed, should this maybe instead be another flag like --simulate? I'm just wary that most other language servers do not take in another argument. I think LSP mode should probably be the default since it allows people to configure their clients by setting only the language server executable without any arguments

@alanz
Copy link
Collaborator Author

alanz commented Jan 1, 2020

@bubba Perhaps, but until very recently (and not yet in a tagged release) we have always used the "--lsp" flag.

Also, this mimics what ghcide does, and I would rather maintain compatibility there.

@fendor fendor merged commit a8c156b into haskell:master Jan 2, 2020
@lukel97
Copy link
Collaborator

lukel97 commented Jan 2, 2020

@alanz We will need to update the README and vscode-hie-server for this, they currently do not contain the --lsp flag

@alanz alanz deleted the 1412-cli-info branch January 2, 2020 18:02
@fendor
Copy link
Collaborator

fendor commented Jan 3, 2020

Should we undo this then, or change the flags as @bubba suggested?

@alanz
Copy link
Collaborator Author

alanz commented Jan 3, 2020

@fendor I updated the vscode client to include the --lsp flag again, I think we should let this stand, for now.

@fendor
Copy link
Collaborator

fendor commented Jan 3, 2020

What about the other clients? Should update them somehow, too?

@alanz
Copy link
Collaborator Author

alanz commented Jan 3, 2020

To my knowledge vscode and emacs-lsp are updated. Not sure what others need it, we should see reports if it is a problem.

Luckily it is just a few days within a release, so they should be supporting the non-master stuff too. Maybe.

@andys8 andys8 mentioned this pull request Jan 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement a simple cli debugging command
3 participants