headers.scala case classes have package private constructors - Scala 3 enforces this
- Dominant language
- Scala
- Stars
- 196
- Forks
- 55
- Avg merge
- 4d 52m
- Merged PRs (30d)
- 74
Description
For some reason, Scala 2 seems to allow public access to package private constructors but Scala 3 enforces it.
We also had to relax the scope on 2 constructors to allow pekko-connectors to compile with Scala 3.
https://github.com/apache/incubator-pekko-http/pull/178
It turns out that Tapir also uses these exact same constructors but Tapir is in its own package. Tapir recently added Pekko HTTP support but didn't add Scala 3 support for Pekko HTTP (https://github.com/softwaremill/tapir/issues/3114).
Should we start making these constructors (see https://github.com/apache/incubator-pekko-http/pull/178) public?
If so, should we backport to 1.0.1 even though this will probably affect binary compatibility?
Adding a hacky org.apache.pekko scoped util class to Tapir should allow a workaround that can create Content-Length/Content-Type instances.
wdyt? @jrudolph @mdedetrich
Contributor guide
Research direction
Start with headers.scala and the constructor changes referenced in pull request 178, then review the Scala 3 compilation impact on pekko-connectors and Tapir. Done would require a decided constructor visibility and backport policy, with the affected integrations compiling under Scala 3.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100