Fix feature permutation mis-compilations found with cargo-hack
Run cargo lints / Lint on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 9m54s
Details
Cargo manifest lints / Lint Cargo manifests on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 14m46s
Details
Run Tests / Test on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 14m28s
Details
Run cargo lints / Lint on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 9m54s
Details
Cargo manifest lints / Lint Cargo manifests on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 14m46s
Details
Run Tests / Test on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 14m28s
Details
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>pull/336/head
parent
8a95febb78
commit
33408146a1
5
Makefile
5
Makefile
|
@ -24,6 +24,7 @@ TAGREF_BIN ?= tagref
|
|||
CARGO_ARGS ?=
|
||||
RUSTFLAGS ?= -D warnings -W unreachable-pub -W rust-2021-compatibility
|
||||
CARGO_SORT_BIN = cargo-sort
|
||||
CARGO_HACK_BIN = cargo-hack
|
||||
PRINTF = /usr/bin/printf
|
||||
|
||||
# Options
|
||||
|
@ -119,6 +120,10 @@ test: test-docs
|
|||
test-docs:
|
||||
@RUSTFLAGS='${RUSTFLAGS}' ${CARGO_BIN} test ${CARGO_ARGS} ${CARGO_COLOR}--target-dir="${CARGO_TARGET_DIR}" --all --doc
|
||||
|
||||
.PHONY: test-feature-permutations
|
||||
test-feature-permutations:
|
||||
$(CARGO_HACK_BIN) hack --feature-powerset
|
||||
|
||||
.PHONY: check-deps
|
||||
check-deps:
|
||||
@(if ! echo ${MIN_RUSTC}\\n`${CARGO_BIN} --version | grep ^cargo | cut -d ' ' -f 2` | sort -CV; then echo "rust version >= ${RED}${MIN_RUSTC}${ANSI_RESET} required, found: `which ${CARGO_BIN}` `${CARGO_BIN} --version | cut -d ' ' -f 2`" \
|
||||
|
|
|
@ -31,7 +31,7 @@ indexmap = { version = "^1.6", features = ["serde-1"] }
|
|||
libc = { version = "0.2.125", default-features = false, features = ["extra_traits"] }
|
||||
libz-sys = { version = "1.1", features = ["static"], optional = true }
|
||||
linkify = { version = "^0.8", default-features = false }
|
||||
melib = { path = "../melib", version = "0.8.5-rc.3" }
|
||||
melib = { path = "../melib", version = "0.8.5-rc.3", features = ["unicode-algorithms"] }
|
||||
nix = { version = "^0.24", default-features = false }
|
||||
notify = { version = "4.0.1", default-features = false } # >:c
|
||||
num_cpus = "1.12.0"
|
||||
|
@ -54,7 +54,7 @@ version = "0.2.3"
|
|||
optional = true
|
||||
|
||||
[features]
|
||||
default = ["sqlite3", "notmuch", "smtp", "dbus-notifications", "gpgme", "cli-docs", "jmap", "text-processing", "static"]
|
||||
default = ["sqlite3", "notmuch", "smtp", "dbus-notifications", "gpgme", "cli-docs", "jmap", "static"]
|
||||
notmuch = ["melib/notmuch"]
|
||||
jmap = ["melib/jmap"]
|
||||
sqlite3 = ["melib/sqlite3"]
|
||||
|
@ -64,7 +64,6 @@ regexp = ["dep:pcre2"]
|
|||
dbus-notifications = ["dep:notify-rust"]
|
||||
cli-docs = ["dep:flate2"]
|
||||
svgscreenshot = ["dep:svg_crate"]
|
||||
text-processing = ["melib/unicode-algorithms"]
|
||||
gpgme = ["melib/gpgme"]
|
||||
# Static / vendoring features.
|
||||
tls-static = ["melib/tls-static"]
|
||||
|
|
|
@ -101,6 +101,11 @@ fn run_app(opt: Opt) -> Result<()> {
|
|||
Some(SubCommand::EditConfig) => {
|
||||
return subcommands::edit_config();
|
||||
}
|
||||
#[cfg(not(feature = "cli-docs"))]
|
||||
Some(SubCommand::Man(ManOpt {})) => {
|
||||
return Err(Error::new("error: this version of meli was not build with embedded documentation (cargo feature `cli-docs`). You might have it installed as manpages (eg `man meli`), otherwise check https://meli-email.org"));
|
||||
}
|
||||
#[cfg(feature = "cli-docs")]
|
||||
Some(SubCommand::Man(ManOpt { page, no_raw })) => {
|
||||
return subcommands::man(page, false).and_then(|s| subcommands::pager(s, no_raw));
|
||||
}
|
||||
|
@ -133,6 +138,13 @@ fn run_app(opt: Opt) -> Result<()> {
|
|||
println!("{}", temp_dir.display());
|
||||
return Ok(());
|
||||
}
|
||||
#[cfg(not(feature = "cli-docs"))]
|
||||
Some(SubCommand::InstallMan {
|
||||
destination_path: _,
|
||||
}) => {
|
||||
return Err(Error::new("error: this version of meli was not build with embedded documentation (cargo feature `cli-docs`). You might have it installed as manpages (eg `man meli`), otherwise check https://meli-email.org"));
|
||||
}
|
||||
#[cfg(feature = "cli-docs")]
|
||||
Some(SubCommand::InstallMan { destination_path }) => {
|
||||
match args::manpages::ManPages::install(destination_path) {
|
||||
Ok(p) => println!("Installed at {}.", p.display()),
|
||||
|
|
|
@ -839,7 +839,7 @@ impl State {
|
|||
title: None,
|
||||
source: None,
|
||||
body: "Message index rebuild failed: meli is not built with sqlite3 support."
|
||||
.to_string(),
|
||||
.into(),
|
||||
kind: Some(NotificationType::Error(ErrorKind::None)),
|
||||
});
|
||||
}
|
||||
|
|
|
@ -134,7 +134,7 @@ pub fn pager(v: String, no_raw: Option<Option<bool>>) -> Result<()> {
|
|||
|
||||
#[cfg(not(feature = "cli-docs"))]
|
||||
pub fn man(_: ManOpt) -> Result<()> {
|
||||
Err(Error::new("error: this version of meli was not build with embedded documentation (cargo feature `cli-docs`). You might have it installed as manpages (eg `man meli`), otherwise check https://meli.delivery"))
|
||||
Err(Error::new("error: this version of meli was not build with embedded documentation (cargo feature `cli-docs`). You might have it installed as manpages (eg `man meli`), otherwise check https://meli-email.org"))
|
||||
}
|
||||
|
||||
pub fn compiled_with() -> Result<()> {
|
||||
|
|
Loading…
Reference in New Issue