Canop / Canop/bacon

Tests are only run on workspace default package

Open
#186 3 comments 2 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
3.4k
Forks
126
Avg merge
2d 1h
Merged PRs (30d)
7

Description

See the [test project here](https://gitlab.com/detly/bacon-workspace-test). It's a simple workspace project with a member package `member-one`. The `member-one` package has an error in a unit test, so it builds when `cargo build --workspace` or `cargo test` are run from the root, but fails when `cargo test --workspace` is run from the root.

If I run `bacon` in the root directory, it builds the whole workspace by default. If you create an error in `member-one` in the non-test code, it's shown. If you remove it, it all passes.

If I then press t, Bacon still shows the project as passing, even though using `cargo test --workspace` directly fails. It seems like Bacon is doing a whole-workspace build, but not testing the whole workspace.

Versions:
- bacon: 2.16.0
- rustc: 1.77.0
- cargo: 1.77.0
- OS: Ubuntu 23.10

Rust toolchain installed via Rustup, default is stable. Bacon installed via Cargo.

Contributor guide

Open the contributing guide

Research direction

Reproduce the behavior with the linked workspace project, comparing Bacon's build and t-key test actions with cargo test --workspace from the root. Trace the command path used for the t action and verify that member-one's failing unit test is included; done means Bacon reports the workspace test failure consistently with Cargo.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.