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

TextDocumentContentChangeEvent requires range while it is optional in LSP spec #48

Closed
soutaro opened this issue Sep 1, 2022 · 4 comments

Comments

@soutaro
Copy link
Contributor

soutaro commented Sep 1, 2022

The range keyword of TextDocumentContentChangeEvent is required in version 3.17.0, but the LSP spec allows having only text attribute.

The best method signature would be the following:

# text is mandatory because all of the interfaces requires the attribute.
# range and range_length are optional even if one of the interfaces requires it.
def initialize(range: nil, range_length: nil, text:)

@paracycle @mtsmfm

@mtsmfm
Copy link
Owner

mtsmfm commented Sep 1, 2022

Thank you for reporting, I'll have a look at

@mtsmfm
Copy link
Owner

mtsmfm commented Sep 1, 2022

@soutaro It seems we have two problems

  1. New generator doesn't handle union type well
  2. Meta model and markdown has some inconsistency

I restored old (TS based) generator and I'm checking the difference in #49
I would be happy if you help to review it

@soutaro
Copy link
Contributor Author

soutaro commented Sep 2, 2022

Thank you @mtsmfm. 🙏
Looks like the old generator is doing correctly (as I expected.) An attribute is required only when all of the union clauses requires it.

@mtsmfm
Copy link
Owner

mtsmfm commented Sep 3, 2022

@soutaro I've released 3.17.0.1 which contains the fix. Thank you for reporting 🙏

@mtsmfm mtsmfm closed this as completed Sep 3, 2022
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

No branches or pull requests

2 participants