Skip to content

Restrict which commands the LSP may run - #105

Merged
stackoverflow merged 2 commits into
apple:mainfrom
stackoverflow:restrict-lsp-commands
Sep 1, 2026
Merged

stackoverflow merged 2 commits into
apple:mainfrom
stackoverflow:restrict-lsp-commands

Conversation

@stackoverflow

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread package.json
"type": "string",
"default": null,
"description": "Path to pkl executable",
"scope": "Pkl"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is an unrelated bugfix. "Pkl" is not a valid scope.

@bioball bioball Aug 26, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we move this into a separate PR?

This would be a breaking change for some clients (e.g. pkl-lsp queries for configuration values with "Pkl" set as its scope). Also, we have a bunch more config values that use "scope": "Pkl"

@stackoverflow stackoverflow Aug 27, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reverted because it's unrelated to this pr.

This would be a breaking change for some clients

Where did you get this idea? scope is a closed enum (https://code.visualstudio.com/api/references/contribution-points#contributes.configuration scope header). Pkl is not a valid value, so vscode is ignoring the value here. There's nothing to break.

Also, we have a bunch more config values that use "scope": "Pkl"

Can you point where? I didn't find any other place with a Pkl scope.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oh, huh, you're right; I thought we did.

Also: here's the code that needs to change in pkl-lsp: https://github.com/apple/pkl-lsp/blob/main/src/main/kotlin/org/pkl/lsp/services/SettingsManager.kt#L142

@stackoverflow
stackoverflow force-pushed the restrict-lsp-commands branch from ad40b05 to d67ac74 Compare August 26, 2026 11:47
@stackoverflow
stackoverflow merged commit cb45aef into apple:main Sep 1, 2026
8 checks passed
@stackoverflow
stackoverflow deleted the restrict-lsp-commands branch September 1, 2026 09:08
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.

3 participants