Giter Club home page Giter Club logo

Comments (5)

stephanbuys avatar stephanbuys commented on June 24, 2024

Hi @k9withabone, I'm happy for any contributions, these should be simple to add, feel free to do it in one pull request. There tests are also failing (I discovered I wasn't parsing all the example files in our suite) which might add some more to your list.

from docker-compose-types.

k9withabone avatar k9withabone commented on June 24, 2024

I've gotten my list completed. Ended up refactoring a few things since this will be a breaking change anyway. I was wondering what your opinion is on Option<Vec<T>> vs Vec<T> for optional fields. Most of the code uses the former, but there is some mixing of the two, for example in Service. Personally, I prefer Vec<T>, but there are arguments for both. I don't mind going through the code and standardizing it either way.

Anyway, on to the tests!

from docker-compose-types.

stephanbuys avatar stephanbuys commented on June 24, 2024

@k9withabone I think Vec<T> is a good solution, with the option to use serde to just not serialize empty vec (#[serde(default, skip_serializing_if = "Vec::is_empty")]). Some of the code in the project is very old, and would reflect a different level of understanding of the language and the crates that I used.

from docker-compose-types.

k9withabone avatar k9withabone commented on June 24, 2024

I've gotten most of the test files passing. I have a couple questions about the last few.
For tests/fixtures/extends/verbose-and-shorthand.yml it seems like it's invalid? From what I can tell the v2 spec doesn't support a shorthand syntax for extends:. Also, shouldn't they be under services:?
For tests/fixtures/net-container/v2-invalid.yml and tests/fixtures/v2-simple/links-invalid.yml they seem like they are valid even though they are marked as invalid?

from docker-compose-types.

stephanbuys avatar stephanbuys commented on June 24, 2024

@k9withabone I've worked with Docker Compose for many years but I don't know the exact answers above, I would refer to the spec just like you did. I copied those fixtures from the main docker project, its possible that some of them were faulty/invalid/skipped.

from docker-compose-types.

Related Issues (16)

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.