redhat-developer / redhat-developer/vscode-xml

Give the command palette revalidation commands a different name from the language server command

Open
#509 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
328
Forks
101
Avg merge
1d 17h
Merged PRs (30d)
7

Description

lemminx registers the commands:

  • xml.validation.current.file
  • xml.validation.all.files
    for retriggering validation on a file when the schema has changed.

vscode-xml also registers commands with the same names that delegate to the lemminx commands. These commands are the ones that appear in the VS Code command palette. In order to delegate to the lemminx commands, the VS Code extension needs to use the EXECUTE_WORKSPACE_COMMAND to specify that the server command should be used.

Instead of using EXECUTE_WORKSPACE_COMMAND, we could call the server validation commands directly if we name the client commands differently. Renaming the client commands will also prevent an error about registering the same command twice from appearing in the debug logs.

Rename the client commands so that the names don't clash and change the client command implementation to invoke the server commands directly.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the VS Code extension's registrations for xml.validation.current.file and xml.validation.all.files, then compare them with the corresponding lemminx commands. Rename the client commands and verify that their implementation invokes the server validation commands directly without EXECUTE_WORKSPACE_COMMAND or duplicate-registration errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.