Giter Club home page Giter Club logo

Comments (6)

adrienthebo avatar adrienthebo commented on September 25, 2024

I was able to reproduce this with the following manifest:

package_use { 'app-admin/puppet':
  target => puppet,
  use => ['minimal', ['shadow']],
}

To confirm the intended behavior is if use is given a nested array, it should be flattened?

from puppet-portage.

tampakrap avatar tampakrap commented on September 25, 2024

i would like it to perform (a+b).uniq

from puppet-portage.

adrienthebo avatar adrienthebo commented on September 25, 2024

I've been thinking about this and I'm not convinced that we should support anything but strings and arrays of strings. With cases like this, it's not clear what the right answer should be and I would rather explicitly fail rather than implicitly try to figure out what was intended. It might make things a bit less flexible but it'll make the module more reliable.

Thoughts?

from puppet-portage.

Flameeyes avatar Flameeyes commented on September 25, 2024

For what I can tell in most other official modules the arrays of arrays are flattened before processing or output, which is why I used that syntax.

If that's what other modules do, I'd expect the portage module to do the same.

from puppet-portage.

adrienthebo avatar adrienthebo commented on September 25, 2024

Oh, I didn't realize that. Could you provide an example of that? If that's a common convention used elsewhere I might be able to reuse the code used in other providers.

from puppet-portage.

vikraman avatar vikraman commented on September 25, 2024

I looked up some of the modules and all of them do flatten either in the manifest or the template. I will patch accordingly.

from puppet-portage.

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.