Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 08:49
    cesarcolle starred http4s/http4s
  • 08:30

    github-actions[bot] on gh-pages

    deploy: 7dd8cf7fd2e68ca7ddfae09… (compare)

  • 08:26
    themorya starred http4s/http4s
  • 08:25

    armanbilge on flake-lock

    (compare)

  • 08:25
    armanbilge closed #6837
  • 08:25

    armanbilge on 0.23

    flake.lock: Update Flake lock … Merge pull request #6837 from h… (compare)

  • 07:47
    mergify[bot] labeled #6837
  • 07:47
    mergify[bot] labeled #6837
  • 07:47

    http4s-steward[bot] on flake-lock

    flake.lock: Update Flake lock … (compare)

  • 07:47
    http4s-steward[bot] opened #6837
  • 07:15
    danicheg commented #771
  • 02:31
    tpsaitwal opened #774
  • Nov 28 20:49

    github-actions[bot] on gh-pages

    deploy: 631d49a93d94ef3375f1c8a… (compare)

  • Nov 28 20:45
    rossabaker commented #771
  • Nov 28 20:42

    danicheg on delete-update-flake

    (compare)

  • Nov 28 20:42

    danicheg on 0.23

    Delete flake workflow [ci skip] Merge pull request #6836 from h… (compare)

  • Nov 28 20:42
    danicheg closed #6836
  • Nov 28 20:25
    armanbilge commented #5010
  • Nov 28 20:25
    armanbilge edited #5010
  • Nov 28 20:24
    jcz2 commented #5010
Ross A. Baker
@rossabaker
I don't really like it. If you're on a system where getDefault throws, it just defers the explosion until the first https call. But the reason it's there is that it gives people who know that getDefault throws a chance to override it. The crucial point is that getDefault not appear as a default argument. That's why we've gotten that bug filed ... twice.
Christopher Davenport
@ChristopherDavenport
Alright. Lets go with it, but lets make it big in the release notes.
We
*We’ll still get the issue
Ross A. Baker
@rossabaker
I would like to do better there, but it's the best I could figure out to do without breaking bincompat.
Christopher Davenport
@ChristopherDavenport
I believe that unblocks 0.20.2
Ross A. Baker
@rossabaker
There's absolutely no way to create an SSLContext that's guaranteed to work, which suggests maybe it should be an Option.
Christopher Davenport
@ChristopherDavenport
Yeah, I think it will still blow up though.
So…
Ross A. Baker
@rossabaker
If it were optional, it would fail with a message of our choosing if someone attempts to make an https call and doesn't have it configured.
And it still needs to be lazy, because Some(sslContext.getDefault) is the right choice for most people.
Christopher Davenport
@ChristopherDavenport
lazy should not be our tool to defer.
but, thats for a binary-breaking change.
Ross A. Baker
@rossabaker
Right. I started speculating on either the original or on the PR what we could do when we do break binary.
Christopher Davenport
@ChristopherDavenport
Http1Support should just take SSLContext
Then we need to explicitly deal with it somewhere after server creation.
Ross A. Baker
@rossabaker
Later is another way of making it lazy to defer.
SyncIO makes it lazy and expresses Dragons Be Here.
F[SSLContext] could have a reasonable default.
I don't like the last two because I tend not to like passing effects as parameters.
Christopher Davenport
@ChristopherDavenport
Except we can’t access that.
Our implicits being in last position is really a PITA
I really want (implicit XYZ)(argumentList)
Ross A. Baker
@rossabaker
Yeah.
If we passed Http1Support and F[SslContext], we've got a ConcurrentEffect[F] (which I'm not proud of), and then could run it in the constructor.
Keeping it lazy in Http1Support is still important though.
We couldn't just strictly run that effect in Http1Support, or we'd break people who can't get an SSLContext and don't want one.
Christopher Davenport
@ChristopherDavenport
Really, how do you opt out?
As that seems like a value that could be evaluated and not properly seperated if we are concerned about that.
Ross A. Baker
@rossabaker
After the bug fix, you opt out today by not making https calls or by creating one that works.
Christopher Davenport
@ChristopherDavenport
Right, seems like we really could split that, rather than having a val that could blow up at any moment in a server that doesn’t intend to support http4s
Not really relevant to this iteration, but long term. Why have both in the same thing rather than a coproduct.
Ross A. Baker
@rossabaker
I'm hazy on what we're splitting.
Christopher Davenport
@ChristopherDavenport
SSL capable servers.
Or clients.
Fabio Labella
@SystemFw

I really want (implicit XYZ)(argumentList)

What's the implicit there? (quickly scrolling)

Ross A. Baker
@rossabaker
Oh... well... hmm.
Christopher Davenport
@ChristopherDavenport
But basically the lazy val is what protects us from blowing up.
Ross A. Baker
@rossabaker
We don't have secure and unsecure requests at the type level.
Christopher Davenport
@ChristopherDavenport
@SystemFw (implicit F: Sync[F])(foo : F[XYZ] = F.delay(xyz))
Fabio Labella
@SystemFw
any other arguments before F?
Christopher Davenport
@ChristopherDavenport
No, I want implicit list first.
Fabio Labella
@SystemFw
why?
(not arguing, just need a quick summary)
Christopher Davenport
@ChristopherDavenport
For defaults, I can do it with a partially applied trick. But its dirty. We do this with things like Logger where we take a Option[String => F[Unit]], and if not supplied one we get the default using the sync instance internally.
Fabio Labella
@SystemFw
because at some point I did various tricks, whose implementations are awful, but managed to encode a lot of these weird requirements, so I'd like to play with that
Christopher Davenport
@ChristopherDavenport
But that’s just a workaround for implicit position.
Ross A. Baker
@rossabaker
Add an argument to BlazeClientBuilder in F that defaults to F.delay(...) and you'll get a taste of the problem being discussed. Though that can minimize to other toy examples quite readily.
Every time I've wanted to do that I've later refactored away from it. Maybe it's good that we can't.