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

Package object disinheritance for scala-xml #4380

Merged

Conversation

rossabaker
Copy link
Member

Inheriting from package objects is on the way out in Scala 3, after being briefly deprecated in Scala 2.13. It also causes problems with sbt's incremental compiler.

It's extensible as a codec project grows, and Cats users should feel at home. It also feels quite overengineered.

The net effect is former importers of

import org.http4s.scalaxml._

would now need to do:

import org.http4s.scalaxml.instances.all._

or

import org.http4s.scalaxml.instances.elem._ // a la carte

or

import org.http4s.scalaxml.implicits._

The choice is bad and the verbosity is bad and the boilerplate in the code is bad but the futureproofing is good and the consistency with upstream is good.

Discuss.

@rossabaker rossabaker force-pushed the package-object-disinheritance branch from eff8cb7 to c08f67b Compare February 8, 2021 04:54
@rossabaker rossabaker marked this pull request as ready for review February 10, 2021 02:18
@rossabaker rossabaker changed the title Package object disinheritance Package object disinheritance for scala-xml Feb 10, 2021
@rossabaker rossabaker merged commit f2ddb78 into http4s:series/0.22 Feb 10, 2021
@rossabaker rossabaker deleted the package-object-disinheritance branch February 10, 2021 02:18
rossabaker added a commit to http4s/http4s-servlet that referenced this pull request Apr 3, 2022
…disinheritance

Package object disinheritance for scala-xml
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