Comments (4)
What bacon does when you call it with --features
is basically adding the argument at the end of the job command arguments.
Here's the default definition of the test job:
[jobs.test]
command = [
"cargo", "test", "--color", "always",
"--", "--color", "always", # see https://github.com/Canop/bacon/issues/124
]
The --
prevents the --features
from being given to the the cargo test command
.
A workaround is to just edit your bacon.toml file to remove the second line of this command, like this:
[jobs.test]
command = [
"cargo", "test", "--color", "always",
]
I should probably detect in bacon when there's a --
and insert the --features
arguments before.
from bacon.
Should be fixed now
from bacon.
(released in 2.15)
from bacon.
Thanks for the advice, it worked ;)
I see that the second line came from #124, cargo # 1983 being the main obstacle for a more elegant solution.
In a general sense, adding --
to job commands, especially to default ones, feels like a bad choice: you don't know when that's needed, and "fixing" this one occasion means a full blown config file (speaking of that, maybe consider merging config with defaults rather than replacing?). If such arguments is absolutely necessary, maybe introduce a new field? Something like passthru_args
(since they are "passed through to" artifacts).
Edit: after second thought, passthru_args
doesn't work because if it exists a --
will be added by bacon, conflicting with user supplied --
on command line. There still needs to be a detecting mechanism.
from bacon.
Related Issues (20)
- bacon reacts to every inotify event, possibly seeing a broken project HOT 8
- Run multiple jobs after each other HOT 5
- Difference between how cargo clippy and bacon clippy treat tests HOT 2
- Fails to build with nightly 98aa3624b 2024-02-08 in ahash-0.8.2 HOT 4
- Bacon fails to properly rerun on changes that happen while compilation is ongoing HOT 7
- Can't seem to make `bacon test --no-default-features` work HOT 2
- Can't build on M3 MacPro with sold linker HOT 5
- wheel scrolling doesn't work in tmux / linux HOT 6
- Not displaying correctly on Windows Terminal, offset by one line HOT 5
- `on_success` doesnโt trigger when there are warnings and `allow_warnings = true` HOT 1
- [feature request] Expand env vars in job command HOT 3
- Inconsistent stdout flushing when using `bacon run`
- Tests are only run on workspace default package
- 2.18.0 build with --locked fails on nightly HOT 3
- Show the error line number in doc test summaries instead of the block line number. HOT 1
- Inconsistent terminal behaviour on windows HOT 8
- Show color in doc test results HOT 1
- Feature Request: Pause? HOT 4
- Synergy with cargo nextest HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bacon.