Repository navigation
Cross-publish protocol for Scala.js - #3
Merged
Merged
Conversation
- Make 'protocol' a mill.Module so nested .jvm/.js submodules are discovered - ByteVector.fromHex already returns Option in scodec-bits 1.2.4; drop .toOption - Move -Xkind-projector:underscores to server module only (protocol uses Scala 3.3.6) Co-authored-by: lavrov <lavrov@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The webapp links
io.github.torrentdam.server::protocol::3.0.0(published Nov 2022, compiled with upickle 1.4.0) while the server builds the protocol from source with upickle 2.0.0. upickle 2.0.0 changed the tagged wire format (case objects are serialized as bare strings, andTaggedReadergainedvisitStringto read them), so the 3.0.0 client cannot parse messages the server sends today (expected dictionary got string).This makes the protocol publishable for Scala.js again so the webapp can consume a protocol artifact compiled with upickle 2.0.0:
InfoHash(hex-string wire format unchanged) and depends only on upickle + scodec-bits, so it can cross-compile for Scala.js (the bittorrent library no longer publishes Scala.js artifacts).protocol.jvm/protocol.jspublish asprotocol_3/protocol_sjs1_3with the same artifact name viaPlatformScalaModule.SocketSessionconverts between protocolInfoHashand the bittorrent libraryInfoHashat the boundary.Release plan: tag
v4.0.0, then update the webapp toio.github.torrentdam.server::protocol::4.0.0.