Conversation
Note: this is only compatible with docker-compose v2.1+
|
Yeah, the big design decision here is how to represent the different versions of the format. For example, should all versions automatically convert to the newest version when loaded? One catch is that the deserializer and the in-memory representation are tightly interlinked. One possible idea would be to implement Unfortuntately, doing this right will probably involve studying the differences between I do think that |
|
One catch I just found is that compose 2.1 didn't have the I'm leaning towards (b) because compose 2.3 requires docker CE 17.06.0, the first release of CE from Sep 2017 and I imagine there are some people who haven't upgraded to CE yet. I'm going to play around with defining a 2.1 next to 2 and see where that leads me. |
|
I mean, ultimately, my sense of perfectionism would like to see this crate intelligently handle all compose versions. |
|
My desire for simplicity would like to read most versions, but only output v2.recent. For now, Basically, I think supporting each of the minor versions separately is too much work and nobody will ever care. I might be wrong, but until somebody complains, let's keep it simple. |
Note: this is only compatible with docker-compose v2.1+
And that brings up an interesting question: do we want to start being smarter about how compose_yml handles docker-compose.yml versions? That is, instead of having the v2 module support 2.0+, have separate modules for v2.0, v2.1, v3.0, etc?
One idea here might be to add a
compose_yml::Filemodule that can intelligently load whichever version ofFilewe need for theversionspecified in the yml file.