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

Implement JSON serialization interface #92

Merged
merged 5 commits into from
Feb 5, 2025

Conversation

BambOoxX
Copy link
Contributor

Fixes #89

No addition for Julia VS Code extension.
Has to be non-breaking, otherwise this is a bug.

Copy link

codecov bot commented Jan 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@5b4c4d5). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #92   +/-   ##
=======================================
  Coverage        ?   90.59%           
=======================================
  Files           ?        5           
  Lines           ?      287           
  Branches        ?        0           
=======================================
  Hits            ?      260           
  Misses          ?       27           
  Partials        ?        0           
Flag Coverage Δ
unittests 90.59% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@davidanthoff
Copy link
Member

I really like this! Could you maybe add some tests? But I will certainly merge this.

@BambOoxX
Copy link
Contributor Author

BambOoxX commented Feb 2, 2025

I thought about additional tests but I faced 2 problems

  • I am not familiar with how test are implemented in JSONRPC and I could not really perform the tests locally.
  • In a sense, I only implemented the JSON interface, with a default setting that should behave just like before. Consequently I figured either JSON tests or JSONRPC tests as they currently are should find any problem that may arise. I can add more tests, I just do not know what they might be.

@BambOoxX
Copy link
Contributor Author

BambOoxX commented Feb 4, 2025

@davidanthoff Any ideas as to what tests could be added on your side ? I would gladly close this ASAP.

@davidanthoff
Copy link
Member

I just added tests to this PR here.

I also changed the implementation slightly, I think the original version essentially had some type piracy issues. Can you take a look over this version, whether that works for you? If tests pass, I'll merge.

@davidanthoff davidanthoff merged commit 30bebd3 into julia-vscode:main Feb 5, 2025
64 of 70 checks passed
@BambOoxX
Copy link
Contributor Author

BambOoxX commented Feb 5, 2025

@davidanthoff In a sense there was a bit of type piracy, in the sense that I defined

Base.print(io::IO, serialization_obj::Tuple{JSON.Serialization,Any})

instead of a

Base.print(io::IO, serialization_obj::Tuple{JSONRPCEndpoint,Any})

i'm fine with your implementation if you are.

Do you plan to move to JSON3 at some point ?

Also, do you plan to release a version with this ?

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

Successfully merging this pull request may close these issues.

Generalize serialization options with respect to JSON interface
2 participants