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

Making Config Loader API Simpler #8789

Open
khajavi opened this issue Apr 24, 2024 · 5 comments
Open

Making Config Loader API Simpler #8789

khajavi opened this issue Apr 24, 2024 · 5 comments

Comments

@khajavi
Copy link
Member

khajavi commented Apr 24, 2024

Let's say I have a config schema like below:

case class AppConfig(port: Int)

object DatabaseConfig {
  implicit val config: Config[AppConfig] = ???
}

Currently, when we need to load an AppConfig we need to write something like this:

ZIO.config(DatabaseConfig.config)   // reading this code feels somhow strange

But I think it is better to change the API using implicit arguments to have something like this:

ZIO.config[DatabaseConfig]  // simpler api
@jdegoes
Copy link
Member

jdegoes commented May 8, 2024

/bounty $75 for the fix and updates to documentation

Copy link

algora-pbc bot commented May 8, 2024

💎 $75 bounty • ZIO

Steps to solve:

  1. Start working: Comment /attempt #8789 with your implementation plan
  2. Submit work: Create a pull request including /claim #8789 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to zio/zio!

Add a bountyShare on socials

Attempt Started (GMT+0) Solution
🟢 @kpritam May 10, 2024, 4:31:27 AM #8836

@kpritam
Copy link
Contributor

kpritam commented May 10, 2024

/attempt #8789

Copy link

algora-pbc bot commented May 10, 2024

💡 @kpritam submitted a pull request that claims the bounty. You can visit your bounty board to reward.

Copy link

algora-pbc bot commented May 12, 2024

🎉🎈 @kpritam has been awarded $75! 🎈🎊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants