melos icon indicating copy to clipboard operation
melos copied to clipboard

request: Possibility to run scripts in predefined sequential order

Open spydon opened this issue 2 years ago • 4 comments

Is there an existing feature request for this?

  • [X] I have searched the existing issues.

Command

melos run

Description

Some scripts should not run concurrently since they might depend on the something done for another package having done the same action first, so it would be good to have a way to run scripts sequentially in a defined order. Maybe something like this:

scripts:
  a: ...
  b:
    run: ...
    depends_on:
      - a

scripts: build-something: run: ... order: - first_package - third_package - second_package

Reasoning

I think that this feature would be useful since all types of scripts won't work to run concurrently.

Additional context and comments

No response

spydon avatar Feb 09 '22 09:02 spydon

A related feature would be the ability to declare dependencies between scripts:

scripts:
  a: ...
  b:
    run: ...
    depends_on:
      - a

This would imply a dependency graph that is a bit more flexible than a sequential list of scripts to run.

blaugold avatar Feb 09 '22 09:02 blaugold

A related feature would be the ability to declare dependencies between scripts:

scripts:
  a: ...
  b:
    run: ...
    depends_on:
      - a

This would imply a dependency graph that is a bit more flexible than a sequential list of scripts to run.

I like this idea and am open to a PR for this

Salakar avatar Mar 04 '22 14:03 Salakar

#433 is very desirable, any progress?

AlexeyAdrianov avatar Mar 05 '24 11:03 AlexeyAdrianov

#433 is very desirable, any progress?

#433 was implemented in #440

spydon avatar Mar 05 '24 11:03 spydon