Git Product home page Git Product logo

Comments (2)

apparentlymart avatar apparentlymart commented on July 30, 2024

Hmm... this feels a little tricky to me because the format of the struct tags is not identical between the two... the hcl struct tags have some extra modifiers to choose between block/attribute/etc while the cty ones don't.

It honestly feels weird to me to expose either of these directly to a plugin developer; that seems like some very tight coupling between the plugin API and Nomad's current choice of configuration syntax.

For context, over in Terraform we're using cty/msgpack within the plugin SDK primarily for convenience (since it's a msgpack interface we already know well) but the plugin developer using our SDK never knows about it and, if a developer were not using our SDK (i.e. in future writing a plugin in a different language entirely) it'd be fine for them to just use any old msgpack parser/formatter as long as it fully supports the latest spec.

(We also added an extra higher-level schema layer over the low-level ones in HCL/cty, and while we did that primarily because Terraform needs some additional metadata that the lower-level systems can't represent, it also serves to insulate plugins from these configuration language details in the other direction.)

from go-cty.

schmichael avatar schmichael commented on July 30, 2024

Sounds good! We're going to switch to using codec and not referencing cty directly at all. Closing.

from go-cty.

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.