Closed cdietrich closed 10 months ago
It does not seem to be intentional.
It got introduced via #133 when this feature was still a proposal.
Perhaps at that stage the name was optional.
But since the time this feature was added to the spec (LSP 3.6), the name was required: https://github.com/microsoft/language-server-protocol/commit/39b118153e7f9ecada27a01a1837edd1823ccfcd
@pisv would you like to add the name to the constructor, or what solution would you prefer? Would it be an incompatible change or not, as it throws errors if not set?
@jnt0r Thanks for the reminder.
I think that the name should be made required, its javadoc changed to match the current wording in the spec, and the constructor WorkspaceFolder(String uri)
removed. Also, the breaking change should be mentioned in the change log.
Would you like to submit a PR for this? Otherwise, I'll handle it, no problem at all.
Alright. Yes, I can submit a PR for that.
Name is optional in WorkspaceFolder constructor, but not in the spec. is this intentional or an oversight?
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspaceFolder