invertase / invertase/melos

request: depends-on filter should be applied to include-dependencies

Open
#560 1 comment 6 reactions 0 assignees View on GitHub
feature request type: accepted
Dominant language
Dart
Stars
1.5k
Forks
259
Avg merge
2h 57m
Merged PRs (30d)
21

Description

### Is there an existing feature request for this?

- [X] I have searched the existing issues.

### Command

_No response_

### Description

It would be useful to have some way of specifying the order of filtering, e.g. that `depends-on` filtering should be applied to packages after `include-dependencies` is processed.

Currently, if I run something like this:

```sh
melos exec --concurrency=1 --fail-fast --scope="$(PACKAGE)" --include-dependencies --order-dependents --depends-on="build_runner" -- "make build"
```

It will exec command **either** on dependency of the scoped package **or** if the scoped package depends on `build_runner`.

### Reasoning

We use `depends-on` to apply the command only to the subset of packages that depend on `build_runner` to generate the code, and it should be generated for all the dependencies as well, but only those that depend on `build_runner`.

### Additional context and comments

_No response_

Contributor guide

Open the contributing guide

Research direction

Start from the `melos exec` command and its `--include-dependencies` and `--depends-on` options. Trace how package filtering and dependency ordering are applied, then verify that `depends-on` limits the packages selected after dependencies are included while preserving the requested ordering.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.