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

Added the possibility of null params for option types #155

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vycastor
Copy link
Contributor

@vycastor vycastor commented Apr 3, 2020

Hi all,

Experimenting lately my development with VSCode, I experimented that it can send null for any field, and ocaml-rpc doesn't support it. I propose here to support this feature at least for option types.

I'd like to write tests for that, but I don't know how to add them. Can you help me with it?

@mseri
Copy link
Collaborator

mseri commented Apr 9, 2020

The behaviour of VSCode is a bit weird though, Some None -> None seems wrong. Maybe we should consider a mechanism to allow for some optional weakening of the rule.

Some None -> None is a join so it is noty that weird after all, it is weird to have a 'a option option :P

@mseri
Copy link
Collaborator

mseri commented Apr 9, 2020

For tests, in this case I would probably keep them simple and add a jsonrpc call for this case to the tests/lib/json.ml file and the corresponding Rpc value to compare

@mseri
Copy link
Collaborator

mseri commented Sep 25, 2020

@vycastor any update on testing this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants