Skip to content

Commit 302d41e

Browse files
committed
xtask: accept all i3status-rs feature combinations to avoid rebuilds
Currently, xtask depends on i3status-rs with only the default features enabled. Running xtask then causes unnecessary rebuilds, if i3status-rs was built with another configuration. We can avoid these by forwarding the features of i3status-rs to xtask, applying them to both packages (resolver >= "2") and ensuring a consistent environment between Cargo invocations. For example: ``` myflags=( --release --features notmuch --no-default-features ) cargo build ${myflags[@]} --package i3status-rs --package xtask cargo run ${myflags[@]} --package xtask -- generate-manpage ``` See-also: https://doc.rust-lang.org/cargo/reference/features.html#resolver-version-2-command-line-flags Signed-off-by: Lucio Sauer <watermanpaint@posteo.net>
1 parent 0658ffa commit 302d41e

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

xtask/Cargo.toml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,19 @@ name = "xtask"
33
version = "0.1.0"
44
edition = "2024"
55

6+
[features]
7+
default = ["i3status-rs/default"]
8+
pulseaudio = ["i3status-rs/pulseaudio"]
9+
pipewire = ["i3status-rs/pipewire"]
10+
notmuch = ["i3status-rs/notmuch"]
11+
maildir = ["i3status-rs/maildir"]
12+
icu_calendar = ["i3status-rs/icu_calendar"]
13+
debug_borders = ["i3status-rs/debug_borders"]
14+
615
[dependencies]
716
anyhow = "1.0"
817
clap = "4.1"
918
clap_mangen = "0.2"
1019
pandoc = "0.8"
1120

12-
i3status-rs = { path = ".." }
21+
i3status-rs = { path = "..", default-features = false }

0 commit comments

Comments
 (0)