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

Enable new LSP tracing capability #29

Merged
merged 7 commits into from
Jul 27, 2018

Conversation

auchenberg
Copy link
Contributor

@auchenberg auchenberg commented Jul 26, 2018

This PR enables our new LSP tracing capability, which creates an output channel in VS Code that allows easy inspection of the LSP traffic, which can be analyzed with https://microsoft.github.io/language-server-protocol/inspector/.

See microsoft/language-server-protocol-inspector#8 + octref/lsp-inspector#8

Changes

  • Update engine version
  • Update language client
  • Document new hack.tracing.server option
  • Changed the LSP activation to be only when a Hack language document is opened. (@PranayAgarwal not sure if the current workspace activation was done for a specific purpose?)
  • Updated the LSP identifier to be hack as it's use as the namespace for the trace setting

Copy link
Member

@PranayAgarwal PranayAgarwal left a comment

Choose a reason for hiding this comment

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

I don't think the activationEvents change is necessary, but looks good otherwise

package.json Outdated
@@ -235,7 +246,7 @@
]
},
"activationEvents": [
"workspaceContains:.hhconfig"
Copy link
Member

Choose a reason for hiding this comment

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

All Hack workspaces need to have a .hhconfig file at root, so this is a good indicator for activating the extension. This way functionality like typechecking and linting can start in the background without needing to open any file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Gotcha. The key thing from a VS Code perspective is perf. We commend only starting the LSP when it's strictly needed, so you might reconsider to have multiple activation contexts.

@@ -224,6 +224,17 @@
},
"default": {},
"description": "Workspaces where whether or not to run custom Hack executables (e.g. hhast-lint) has been remembered"
},
"hack.trace.server": {
Copy link
Member

Choose a reason for hiding this comment

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

Is this config read by vscode automatically? (I don't see it used anywhere)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@auchenberg
Copy link
Contributor Author

Activation changed reverted.

Copy link
Member

@PranayAgarwal PranayAgarwal left a comment

Choose a reason for hiding this comment

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

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants