-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add http4s to community build #14071
Conversation
Hmm, I'm getting errors like this:
What I don't understand is why this affects specifically http4s. E.g. the Cats Effect 3 project also uses the |
I understood the problem: all the projects in the community build using sbt-spiewak are on an old version, before the The |
The community build has no special requirement of |
When I follow these instructions from the error message:
It's using updateOptions in Global ~= (_.withLatestSnapshots(false))
addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.5")
addSbtPlugin("ch.epfl.lamp" % "sbt-community-build" % "0.1.0-SNAPSHOT")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.7.1")
@prolativ are you sure about this? Do you know how to remove Edit: I found the place to remove it, and I did. Let's see what happens. |
Unfortunately I can't spend too much time on investigating into that at the moment. I also can't see the exact error you got because now dotty's entire CI is failing for some reason (not related to your PR). |
Thanks for the reply. I pointed out the problem in #14071 (comment): basically, http4s depends on a build plugin sbt-spiewak which adds an |
BTW, I opened an issue about this djspiewak/sbt-spiewak#83. Several of the Typelevel projects have not been updated for several months, however when you do Cats Effect 3 and fs2 both depend on new versions of sbt-spiewak and will have this exact same problem that I've encountered here. |
5e9dc9a
to
470eb9c
Compare
CI is green! @anatoliykmetyuk can you please help setup a fork of http4s in dotty-staging? Thanks :) |
project = "http4s", | ||
sbtTestCommand = "set ThisBuild/tlFatalWarnings := false; rootJVM/test", | ||
sbtPublishCommand = "set ThisBuild/tlFatalWarnings := false; publishLocal", | ||
dependencies = () => Nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I omitted the dependencies for now b/c http4s depends on newer cats/effect/fs2 etc. versions than what's currently offered in the build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this approach is quite fragile and has only succeeded here because http4s
has been added to CommunityBuildTestC
whereas the rest of the Typelevel stack is in CommunityBuildTestB
.
If another project that depends on cats/effect/fs2 is ever added to CommunityBuildTestC
, or http4s
is moved to CommunityBuildTestB
, then this strategy falls apart, as the community build injects dependency overrides for all previously built projects in each partition.
The right thing to do here IMO is to bump the dependencies in the community build. I'll open a PR to do so, unless there's some reason we can't (have the issues with sbt-spiewak
been resolved)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your comment. Ah, I wasn't aware that was the difference between the community builds. I agree, this is probably not the right approach esp. for long-term.
Unfortunately the issues with sbt-spiewak have not been resolved. http4s is now using sbt-typelevel, as is fs2, so it should be possible to update those. cats-effect is still using sbt-spiewak unfortunately. Cats may have problems because of https://github.com/typelevel/cats/blob/9ab4a6e00737d074339e0b2c124c832aebc47c88/build.sbt#L6 but that can be fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @djspiewak
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good news, it seems that Cats Effect is not currently referencing the isDotty
setting in its build.sbt
. So I think it should be fine.
I opened typelevel/cats#4119 for Cats.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@griggt actually it looks like the Cats already in the community build has the isDotty
setting defined in its build.sbt
without conflicts. So it must be okay. I think you should be able to update all the dependencies 👍
@armanbilge I added a fork of http4s to dotty-staging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should merge this until we get the dependency issues resolved (see comments above)
I'm working on PRs to fix this in Cats and Cats Effect. Thanks again for your help. |
Finally! Can we land this one 😩 |
Hooray 🎉 thanks again for all of your help @griggt :) |
Closes http4s/http4s#5672.