Several specification changes have been made to Compose (e.g.: removing the version field requirement) that have not been taken into account by the docker/cli Compose file parser. We should move projects using it to the compose-spec/compose-go parser as this is maintained along side the spec.
There is some example code in the tests of that repo, otherwise, see https://github.com/docker/compose-cli.