Skip to content

Conversation

alexarchambault
Copy link
Collaborator

@alexarchambault alexarchambault commented Mar 14, 2024

The jsonrpc4s update is meant to fix borked JSON in the BSP responses. Without the update, sending a request with an unsupported method name returns something like

{
    "id": 2,
    "error": {
        "code": -32601,
        "message": "workspace/buildTargetz"
    }
},{
    "error": {
        "code": -32601,
        "message": "workspace/buildTargetz"
    },
    "id": 2,
    "jsonrpc": "2.0"
}

With the fix, it returns

{"error":{"code":-32601,"message":"workspace/buildTargetz"},"id":2,"jsonrpc":"2.0"}

as expected.

This commit in jsonrpc4s fixes that, and its message explains why.

@alexarchambault alexarchambault marked this pull request as draft March 14, 2024 14:21
ivy"com.github.plokhotnyuk.jsoniter-scala::jsoniter-scala-core:$jsoniterVersion"
def jsoniterMacros =
ivy"com.github.plokhotnyuk.jsoniter-scala::jsoniter-scala-macros:$jsoniterVersion"
def jsonrpc4s = ivy"io.github.alexarchambault.bleep::jsonrpc4s:0.1.1"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for the fork? Any chance to just include it in the library?

Btw. I just moved the fork to https://github.com/VirtusLab/bloop-core since I didn't want to bother you every time something broke (and release did actually break).

As a side note, I also plan to move most of the things back to original Bloop to get rid of the fork altogether, since we plan to switch it to JDK 17 soon. Would it be enough to just move bloop-rifle back? I don't see anything else that is hugely changed from the original Bloop

Copy link
Collaborator Author

@alexarchambault alexarchambault Mar 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for the fork? Any chance to just include it in the library?

It's just easier for me to have the fix be released and usable from here (I tried to upstream some changes in snailgun some time ago, but they're still not released…)

Btw. I just moved the fork to https://github.com/VirtusLab/bloop-core since I didn't want to bother you every time something broke (and release did actually break).

I intend to cut a release right after merging this, so I'll probably fix that

As a side note, I also plan to move most of the things back to original Bloop to get rid of the fork altogether, since we plan to switch it to JDK 17 soon. Would it be enough to just move bloop-rifle back? I don't see anything else that is hugely changed from the original Bloop

Good that the changes in shared / backend / frontend are upstreamed. But bloop-rifle should be used by the Bloop CLI, and so should live alongside it in the Bloop repo IMO. It doesn't really need to live in the Scala CLI repo anyway I think.

@alexarchambault alexarchambault marked this pull request as ready for review March 14, 2024 21:20
@alexarchambault alexarchambault merged commit 82003e6 into scala-cli:main Mar 15, 2024
@alexarchambault alexarchambault deleted the bump-jsonrpc4s branch March 15, 2024 10:14
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.

2 participants