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

tolerant contract #25

Open
Radvendii opened this issue Aug 3, 2023 · 0 comments
Open

tolerant contract #25

Radvendii opened this issue Aug 3, 2023 · 0 comments

Comments

@Radvendii
Copy link
Collaborator

right now we only turn the json schema into a nice record contract if it can be perfectly represented as such. otherwise, we fall back to a contract generated from a predicate.

in that more general case, the LSP doesn't get any information for e.g. autocompletion.

we should

  • generate a contract that allows more than the json schema would, but will give some information to the LSP.
  • use std.contract.Sequence to apply both that contract and the more accurate predicate contract
  • teach the LSP to understand std.contract.Sequence so it can get the information out of the record contract
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

1 participant