Skip to content

Check for dynamic registration in textDocument/typeDefinition and workspace/executeCommand#1748

Merged
mickaelistria merged 3 commits into
eclipse-lemminx:mainfrom
daniellaing:fix-dynamic-registration-capabilities
Jul 28, 2025
Merged

Check for dynamic registration in textDocument/typeDefinition and workspace/executeCommand#1748
mickaelistria merged 3 commits into
eclipse-lemminx:mainfrom
daniellaing:fix-dynamic-registration-capabilities

Conversation

@daniellaing

Copy link
Copy Markdown
Contributor

For #1142

This might not be all the capabilities which are erroneously registered, only the ones I've seen an error for (in my limited use).

Seems to also fix a maven test, 6 fails down to 5. Not sure which one now passes though...

Comment on lines +206 to +209
if (this.getClientCapabilities().isExecuteCommandRegistered()) {
registerCapability(WORKSPACE_EXECUTE_COMMAND_ID, WORKSPACE_EXECUTE_COMMAND,
new ExecuteCommandOptions(commands));
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you please just restore those lines to their initial formatting to avoid non-payload change in the same commit as the fix?

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.

I'm not sure what you mean by this, do you mean the indentation?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, we try to keep the indentation the same as much as possible so that the commits are focused on the actual code change (indentiation change make it often harder to read history, we try to process indentation changed when necessary in dedicated commits)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

OK, my bad, I see that the code actually changes!
So I'm going to merge it, I don't think indentation is so critical to delay merging further.

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.

Yup, added a check :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If you see on github you will see that there are some trouble with formatting

image

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.

Think that's the indentation fixed now

@mickaelistria

Copy link
Copy Markdown
Contributor

This project requires that you sign the Eclipse Contributor License Agreement to certify you're not intentionally introducing malicious or stolen code. Can you please sign it at https://accounts.eclipse.org/user/eca ?

@daniellaing

Copy link
Copy Markdown
Contributor Author

This project requires that you sign the Eclipse Contributor License Agreement to certify you're not intentionally introducing malicious or stolen code. Can you please sign it at https://accounts.eclipse.org/user/eca ?

Signed

@angelozerr

Copy link
Copy Markdown
Contributor

LGTM, thanks @daniellaing !

@fbricon @mickaelistria I let you to merge the PR.

@angelozerr
angelozerr self-requested a review July 28, 2025 15:10
@angelozerr angelozerr added the bug Something isn't working label Jul 28, 2025
@angelozerr angelozerr added this to the 0.31.1 milestone Jul 28, 2025
@mickaelistria
mickaelistria merged commit 7743bc0 into eclipse-lemminx:main Jul 28, 2025
7 of 9 checks passed
@mickaelistria

Copy link
Copy Markdown
Contributor

Thanks a lot @daniellaing !

@daniellaing
daniellaing deleted the fix-dynamic-registration-capabilities branch July 28, 2025 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants