Cross Server and ember server to JS in 0.23#5663
Merged
rossabaker merged 4 commits intohttp4s:series/0.23from Dec 6, 2021
Merged
Cross Server and ember server to JS in 0.23#5663rossabaker merged 4 commits intohttp4s:series/0.23from
Server and ember server to JS in 0.23#5663rossabaker merged 4 commits intohttp4s:series/0.23from
Conversation
armanbilge
commented
Dec 5, 2021
Comment on lines
57
to
69
| ) | ||
| val Host = InetAddress.getLoopbackAddress.getHostAddress | ||
| def Host = InetAddress.getLoopbackAddress.getHostAddress | ||
| val HttpPort = 8080 | ||
|
|
||
| val IPv4SocketAddress: InetSocketAddress = | ||
| def IPv4SocketAddress: InetSocketAddress = | ||
| InetSocketAddress.createUnresolved(IPv4Host, HttpPort) | ||
| val IPv6SocketAddress: InetSocketAddress = | ||
| def IPv6SocketAddress: InetSocketAddress = | ||
| InetSocketAddress.createUnresolved(IPv6Host, HttpPort) |
Member
Author
There was a problem hiding this comment.
I had to make these defs so that the Scala.js linker can elide them. It's not ideal of course, but the alternative is splitting files. Reasonable compromise?
This was referenced Dec 5, 2021
Merged
ChristopherDavenport
approved these changes
Dec 5, 2021
rossabaker
approved these changes
Dec 6, 2021
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.
Here we are again :)
Merging this will fully synchronize 0.23 and main regarding JS crosses. This is valuable e.g. for #5657 since it's very difficult to anticipate a crossed-main from an uncrossed 0.23.
It's not elegant, but I finally figured out how to work around the
InetSocketAddressissue:Serveris (unfortunately) split/duplicated across JVM and JS, and a http4s-privateIp4sServerprovides a cross-platform way to implementServerwithout touchingInetSocketAddressand using only ip4s stuff. This allows us to cross ember-server.