Skip to content

Conversation

@MrChrisRodriguez
Copy link

When there are multiple workspace configs found (e.g., bun and Moon):

  • if they're equivalent, proceed
  • otherwise, user can choose which one(s) to use for automatically-created dmno configurations

Note: this is a fork of another PR which supports modern workspace configs

Selection

image

Post Selection

image

Handle both legacy format (workspaces as array) and modern (workspaces as object with packages property) formats
When there are multiple workspace configs found, choose which one(s) to use for automatically creating configurations.
@theoephraim
Copy link
Member

theoephraim commented Jul 9, 2025

First off, thanks so much for taking the time to create this and the other PRs 🥳

Obviously this is an edge case, and not something I have exactly encountered in my projects so far, so your input here is super helpful.

At first glance, this is great, and it definitely makes sense during the init flow to prompt the user about this.

My only concern is that, if I'm reading it correctly, it could add an interactive prompt to the loading process in general, which is triggered whenever we are trying to resolve the config. This could be triggered over and over again in some dev workflows, or add an extra manual step to some commands. Please let me know if this is not the case!

My general strategy so far has been to try to just do the right thing automatically, and when there is some ambiguity that could be removed by the user, throw an error with some helpful info.

For this case where it's not clear which globs to use for child projects, we do provide a .dmno/workspace.yaml which will override all other potential sources of this info. See https://dmno.dev/docs/guides/monorepos/#detecting-child-services for more details. In this case where we have multiple sources of child globs, I'd probably either just throw an error and tell the user to use this .dmno/workspace.yaml file to disambiguate. Obviously now keeping that info in 3 places isn't great, so you could add a new setting in that file - rather than setting the globs directly, sets a path to the file(s) to use. If you wanted to make it extra fancy, you could have the init flow prompt the user, and then write their selection to the workspace file, although it may not be worth the effort.

Happy to discuss further!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants