8000 Make `*VersionSpecific` and `*PlatformSpecific` traits package-private by kyri-petrou · Pull Request #9491 · zio/zio · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Make *VersionSpecific and *PlatformSpecific traits package-private #9491

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

Conversation

kyri-petrou
Copy link
Contributor
@kyri-petrou kyri-petrou commented Jan 23, 2025

Currently we have a lot of *VersionSpecific and *PlatformSpecific traits that are public. This is unnecessary and likely also a bit distracting for users when they have imports such as import zio.*.

Other minor changes:

  • Sealed =!= (no idea why this wasn't sealed previously)
  • Changed some compat methods to package-private
  • Changed some lazy vals such as lazy val EnvironmentTag = izumi.reflect.Tag to just val

Note that making traits / classes / methods package-private is binary compatible as in the compiled bytecode, package-private objects are public.

def unexpected: Nothing = sys.error("Unexpected invocation")

implicit def neq[A, B]: A =!= B = new =!=[A, B] {}
implicit def neq[A, B]: A =!= B = instance.asInstanceOf[=!=[A, B]]
Copy link
Collaborator

Choose a reason for hiding this comment

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

😱

@kyri-petrou kyri-petrou merged commit c227800 into zio:series/2.x Jan 23, 2025
18 checks passed
@kyri-petrou kyri-petrou deleted the make-version-specific-traits-package-private branch January 23, 2025 08:18
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
0