About version (deprecated) in compose file
wushu037 opened this issue · comments
File: 03-compose-file.md
The documentation mentions: "The Compose file is a YAML file defining version (DEPRECATED)."
version
seems useful, why is it deprecated?
I'm sorry, but I didn't find anything in the "Version and name top-level element" documentation that would ==strongly indicate== that "version" is deprecated
Hiya @wushu037 –
If you'd like some more context as to why we deprecated the version
top level element, you can look through the following issues and discussion there:
The reason that we specifically call out that the element is deprecated is that, as noted in this part of the spec:
Top-level version property is defined by the specification for backward compatibility but is only informative.
A Compose implementation SHOULD NOT use this version to select an exact schema to validate the Compose file, but prefer the most recent schema at the time it has been designed.
So the version
element isn't being used for anything while parsing the Compose file, and hence the deprecated warning.
@laurazard
Thank you, that clears up my doubts