request: Omit no test failure and should pass --fail-fast
- Dominant language
- Dart
- Stars
- 1.5k
- Forks
- 259
- Avg merge
- 3h 11m
- Merged PRs (30d)
- 19
Description
### Is there an existing feature request for this?
- [X] I have searched the existing issues.
### Command
--fail-fast 1
### Description
I have used `melos` to test with `--tags` arguments. With 20+ private packages, some packages used certain tags, but some not. That would cause melos FAILED on packages which don't have the specified tag. For me, It looks wrong since It's not really a failure, but a empty test run. Maybe we should have an exception for no tests?
ex. `melos exec -c 1 --fail-fast 1 -- \ flutter test --tags sometags`
```
--------------------------------------------------------------------------------
console_repository:
00:00 +0: loading D:\Project\McDedicatedServer\minecraft_cube_desktop\minecraft_cube_desktop\packages\console_repository\test\console_reposit00:01 +0: loading D:\Project\McDedicatedServer\minecraft_cube_desktop\minecraft_cube_desktop\packages\console_repository\test\console_repositNo tests ran.
No tests match the requested tag selectors:
include: "integration"
exclude: ""
--------------------------------------------------------------------------------
$ melos exec
└> flutter test -j1 --no-pub --tags integration
└> FAILED (in 1 packages)
└> console_repository (with exit code 1)
pub finished with exit code 1
```
### Reasoning
For the `melos` users who work with the arguments `--tags`, `--excluded-tags`, or another filter arguments that might cause no test.
### Additional context and comments
[Here](https://github.com/dart-lang/test/blob/030816c32b6fe78d5fb7653afbd9f63cca18bacf/pkgs/test_core/lib/src/util/exit_codes.dart#L59) is the `exitCode` list from dart test, not sure If It's matched, since the logs above shows `with exit code 1`.
Contributor guide
Research direction
Start at the melos exec --fail-fast entry point and compare its handling of flutter test's exit code with dart test's pkgs/test_core/lib/src/util/exit_codes.dart, linked in the issue. Verify behavior with a package matching no requested tags; done means no-test runs are not reported as FAILED while genuine failures still stop execution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- cli, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100