Skip to content

Order builds by package #767

Answered by spydon
jeremy-giles asked this question in Q&A
Oct 7, 2024 · 1 comments · 8 replies
Discussion options

You must be logged in to vote

I would suggest to just generate all files within packages that depend on build_runner and go through with --order-dependents, so that it does the leaf dependencies first, like this for example:

  generate: >
    melos exec -c 1 --order-dependents --fail-fast --depends-on="build_runner" -- \
      dart run build_runner build --delete-conflicting-outputs

If you're having circular dependencies that won't work though.

If you have circular dependencies I would recommend that you create three categories, and then use exec on each category in order:
https://melos.invertase.dev/configuration/overview#categories
https://melos.invertase.dev/filters#--category

Currently you are trying to run build_…

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@jeremy-giles
Comment options

@spydon
Comment options

@jeremy-giles
Comment options

@spydon
Comment options

@jeremy-giles
Comment options

Answer selected by jeremy-giles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants