Skip to content

Conversation

@Kalin-Rudnicki
Copy link
Contributor

The way ZClientPlatformSpecific defines its layers, with layers of the same names but different types on different platforms, is a bit unfortunate for a consuming library which is also cross platform, and does not want to deal with platform-specific things within zio-http.

The only layer which has a consistent signature is default.

There is no consistent layer across platforms which has the signature ZLayer[ZClient.Config, Throwable, Client]. This MR adds such a layer builder.

@netlify
Copy link

netlify bot commented Oct 6, 2025

Deploy Preview for zio-http ready!

Name Link
🔨 Latest commit e50a84d
🔍 Latest deploy log https://app.netlify.com/projects/zio-http/deploys/6933c1b4e1fc0d0008c0227e
😎 Deploy Preview https://deploy-preview-3727--zio-http.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.


trait ZClientPlatformSpecific {

def requiringConfig: ZLayer[ZClient.Config, Throwable, Client] =
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would have ideally like to have called this something like customized or configured, but both of those are already taken by type-mismatching platform-specific overrides. Open to naming suggestions if something else is preferable.

Copy link
Contributor

Choose a reason for hiding this comment

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

You could do fromConfig, withConfig or even configured, since the new one has no params

@987Nabil 987Nabil force-pushed the current/feature/consistent-layers branch from 4443ac4 to e50a84d Compare December 6, 2025 05:40
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