Giter VIP home page Giter VIP logo

Comments (2)

afsalthaj avatar afsalthaj commented on August 30, 2024 1

@bilal-fazlani This goes back to again ZIO.
I have pealed off components of zio-config, and tried just with ZIO

object Example extends ZIOAppDefault {
  case class Foo(duration: Duration)

  val run = ConfigProvider
    .fromMap(Map("duration" -> "10.seconds"))
    .load(Config.duration("duration"))
    .debug
}

and this produce the same error:

<FAIL> Fail((Invalid data at duration: Expected a duration value, but found 10.seconds),Stack trace for thread "zio-fiber-4":
	at zio.ConfigProvider.Flat.util.parsePrimitive(ConfigProvider.scala:313)
	at zio.ConfigProvider.Flat.util.parsePrimitive(ConfigProvider.scala:314)
	at zio.ConfigProvider.Flat.util.parsePrimitive(ConfigProvider.scala:315)
	at zio.config.examples.Example.run(DurationApp.scala:12)
	at zio.config.examples.Example.run(DurationApp.scala:13))
timestamp=2023-03-06T14:15:17.018552Z level=ERROR thread=#zio-fiber-0 message="" cause="Exception in thread "zio-fiber-4" zio.Config$Error$InvalidData: (Invalid data at duration: Expected a duration value, but found 10.seconds)
	at zio.ConfigProvider.Flat.util.parsePrimitive(ConfigProvider.scala:313)
	at zio.ConfigProvider.Flat.util.parsePrimitive(ConfigProvider.scala:314)
	at zio.ConfigProvider.Flat.util.parsePrimitive(ConfigProvider.scala:315)
	at zio.config.examples.Example.run(DurationApp.scala:12)
	at zio.config.examples.Example.run(DurationApp.scala:13)"

I will see why this happens. But I am closing this issue in zio-config and create a new one in ZIO, to avoid confusion

from zio-config.

bilal-fazlani avatar bilal-fazlani commented on August 30, 2024

Why is closed? I am also facing issue

Expected a duration value, but found 30m

from zio-config.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.