Skip to content

Conversation

@rtoohil
Copy link

@rtoohil rtoohil commented Dec 1, 2025

My compose file has a more complex use of the depends_on functionality than Container-Compose used.

I will admit that Swift isn't my best language, so I worked with Claude Code to build this PR. This adds support for various depends_on syntaxes such as:

1. Simple string (no colon after service name):

  depends_on: mysql

  2. Simple array:

  depends_on:
    - mysql
    - redis

  3. Dictionary without conditions (empty/null values):

  depends_on:
    mysql:
    redis:

  4. Dictionary with conditions (full format):

  depends_on:
    mysql:
      condition: service_healthy
    redis:
      condition: service_started

It doesn't handle the health check well yet, but we can expand upon that. This handled my more complex depends_on case.

@Mcrich23
Copy link
Owner

Mcrich23 commented Dec 1, 2025

Thank you. I'm curious about your thoughts on this general idea given the lack of support for the features described in your compose file.

@rtoohil
Copy link
Author

rtoohil commented Dec 1, 2025

Honestly, part of the idea was simply to reduce the friction for someone getting started, i.e. I have a working compose file that I use with docker compose. Rather than forcing users to rewrite, can handle the array/dictionary case to allow someone's existing file to get things going. If desired, for things like condition, could log that those are not yet implemented/supported.

I can see the argument for not supporting the condition case at all, but I still think the friction reduction is worth it (one singular opinion here)

@Mcrich23
Copy link
Owner

Mcrich23 commented Dec 1, 2025

This is true. I will do a manual review of your PR when I have a chance. One way that would be incredibly helpful to contribute if you would like would be to document the current status of compose yaml feature support.

Feel free not to if you don't want to or don't have the capacity to.

@rtoohil
Copy link
Author

rtoohil commented Dec 1, 2025 via email

@Mcrich23
Copy link
Owner

Mcrich23 commented Dec 1, 2025

Thank you. Can you please add tests for this? I want to ensure in the future that this kind of compose file will continue to build.

@rtoohil
Copy link
Author

rtoohil commented Dec 3, 2025 via email

@Mcrich23
Copy link
Owner

Mcrich23 commented Dec 3, 2025

Thank you. It appears all of the tests are passing on main which would mean that it is an issue in your pr.

@rtoohil
Copy link
Author

rtoohil commented Dec 3, 2025 via email

@Mcrich23 Mcrich23 self-assigned this Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants