Skip to content
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

Weaken constraints #24

Merged
merged 5 commits into from
May 26, 2022
Merged

Weaken constraints #24

merged 5 commits into from
May 26, 2022

Conversation

rossabaker
Copy link
Member

No description provided.

@@ -88,4 +100,12 @@ object BlockingHttp4sServlet {
DefaultServiceErrorHandler,
dispatcher,
)

protected[servlet] def apply[F[_]](
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one? I think your only recourse to preserve static forwarders is to leave it public and rely on deprecation and source-incompatible changes to dissuade use, as you've done here. Not sure what protected does for object methods.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I think that was the trick I was thinking of... we make the implicit explicit. And we have to make it public for that static forwarder. Sad.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that in Scala 3 it's the other way around. Even package-private object methods will generate static-forwarders.

This causes problems with MiMa for internal methods, however.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fuck. I'm just going to leave that one alone then. They can use the constructor, and Servlet > 3 is coming.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What you have here is fine for Scala 2 and 3. The Scala 3 thing works in our favor here, but bites in different situations until MiMa can fix it.

@rossabaker
Copy link
Member Author

I think maybe the sbt-http4s-org upgrade on the merge commit is enforcing more things, but I don't know why it wasn't already broken? The last three commits are odd.

@rossabaker rossabaker merged commit f327cff into series/0.23 May 26, 2022
@rossabaker rossabaker deleted the weaken-constraints branch May 26, 2022 17:42
@armanbilge
Copy link
Member

Ah, it's because you were seeing build failures on the "push" jobs, not the "merge" jobs. I think this PR was based against a bad branch.

@rossabaker
Copy link
Member Author

Yeah, branches were in flux as I was doing this.

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