Skip to content

Use Host instead of Hostname for Session creation #1097

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

Merged

Conversation

keynmol
Copy link
Contributor

@keynmol keynmol commented Jun 5, 2024

Hostname is not capable of parsing IPV6 addresses:

scala> Hostname.fromString("127.0.0.1")
val res0: Option[com.comcast.ip4s.Hostname] = Some(127.0.0.1)

scala> Host.fromString("127.0.0.1")
val res1: Option[com.comcast.ip4s.Host] = Some(127.0.0.1)

scala> res1.map(_.getClass.getName)
val res2: Option[String] = Some(com.comcast.ip4s.Ipv4Address)

scala> Hostname.fromString("::1")
val res0: Option[com.comcast.ip4s.Hostname] = None

scala> Host.fromString("::1")
val res1: Option[com.comcast.ip4s.Host] = Some(::1)

(repl sessh courtesy of @mpilquist )

@mpilquist
Copy link
Member

Thanks! Can we target series/0.6 instead of main?

@keynmol keynmol changed the base branch from main to series/0.6.x June 5, 2024 17:51
@keynmol keynmol changed the base branch from series/0.6.x to main June 5, 2024 17:52
@keynmol keynmol force-pushed the use-host-instead-of-hostname branch from 7874b0a to ea8f302 Compare June 5, 2024 17:58
@keynmol keynmol changed the base branch from main to series/0.6.x June 5, 2024 17:58
@keynmol
Copy link
Contributor Author

keynmol commented Jun 5, 2024

Done

@mpilquist mpilquist merged commit 62dad97 into typelevel:series/0.6.x Jun 5, 2024
@keynmol
Copy link
Contributor Author

keynmol commented Jun 5, 2024

I can backport it to main to eventually get a 1.x milestone with it

@keynmol keynmol deleted the use-host-instead-of-hostname branch June 5, 2024 18:08
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