Git Product home page Git Product logo

Comments (7)

jdiazcano avatar jdiazcano commented on June 11, 2024

Is this a bug or just for more coverage?

I'm right now on a trip and I'll be back next week! I'll try to do it asap

from cfg4k.

jdiazcano avatar jdiazcano commented on June 11, 2024

Have in mind that there is a specific class for nesting even though I'm thinking in merging both.

from cfg4k.

rocketraman avatar rocketraman commented on June 11, 2024

Well... here is my situation. I tried to create a (hocon) config like this:

a.b.c = something

And then I tried to reference it in the code like this:

configProvider.bind<B>("a.b")

where B looks like:

interface B {
  fun c(): String
}

which didn't work. So I was looking for unit tests to see if this was a) a syntax error on my part, or b) something that isn't even supported. I didn't find any tests for this case.

FWIW, I do it this way in cfg4j.

from cfg4k.

jdiazcano avatar jdiazcano commented on June 11, 2024

I'll investigate

from cfg4k.

jdiazcano avatar jdiazcano commented on June 11, 2024

@rocketraman what provider are you using? If possible could you paste a snippet to reproduce?

in ProviderWithHocon.kt i've added a loader and a proxy provider

val deployment = provider.bind<KtorDeploymentConfig>("ktor.deployment")
deployment.port.should.be.equal(8080)

And it works

from cfg4k.

rocketraman avatar rocketraman commented on June 11, 2024

@jdiazcano What do you know... I just tried it again and it worked perfectly. I'll close. Thanks!

from cfg4k.

jdiazcano avatar jdiazcano commented on June 11, 2024

I am still merging the changes for the tests.

from cfg4k.

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.