From c2d875cc4078d1b3837877e1006a345572076b35 Mon Sep 17 00:00:00 2001 From: Avril Date: Fri, 14 Mar 2025 15:10:10 +0000 Subject: [PATCH] Started revisional update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fortune for termprogress's current commit: Half blessing − 半吉 --- Cargo.toml | 8 +++++--- build.rs | 3 +++ src/lib.rs | 2 ++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d47f587..62605c8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,25 +2,27 @@ name = "termprogress" description = "A terminal progress bar renderer with status and spinners" license = "GPL-3.0-or-later" -version = "0.10.0" +# TODO: After full interface update & correction, bump version to `0.11.0` instead or a revision. +version = "0.10.0-r1" authors = ["Avril "] edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features] -default = ["size"] +default = ["size", "reactive"] # Use terminal size when drawing bars. size = ["terminal_size"] -# React to `SIGWINCH` when `stdout` is a terminal (linux only.) +# TODO: React to `SIGWINCH` when output stream is a terminal (linux only.) reactive = [] [dependencies] atomic_refcell = "0.1.10" stackalloc = "1.2.0" terminal_size = {version = "0.1", optional = true} + [build-dependencies] rustc_version = "0.2" diff --git a/build.rs b/build.rs index 6399463..15d080f 100644 --- a/build.rs +++ b/build.rs @@ -6,6 +6,9 @@ fn main() { // Assert we haven't travelled back in time assert!(version().unwrap().major >= 1); + println!("cargo::rustc-check-cfg=cfg(nightly)"); + println!("cargo::rustc-check-cfg=cfg(stable)"); + // Set cfg flags depending on release channel match version_meta().unwrap().channel { Channel::Stable => { diff --git a/src/lib.rs b/src/lib.rs index f59a6d8..7367cac 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,6 +2,8 @@ #![allow(dead_code)] +//TODO: XXX: Change default output to `stderr`, **NOT** stdout, ffs... Also add allow custom stream output. Change behaviour that if `not isatty(S)` with `terminal_size` feature enabled an error is returned instead of *guessing* default sizes when it's not (caller can force by `unwrap_or*(50)`.) + macro_rules! flush { ($stream:expr) => { {