dtolnay / isatty Goto Github PK
View Code? Open in Web Editor NEWlibc::isatty that also works on Windows
License: Apache License 2.0
libc::isatty that also works on Windows
License: Apache License 2.0
Thanks for providing this library!
Given the scope, do you think it is ready to go 1.0?
Motivation for this question is me using it in tokio-cassandra, and I would like to get all dependencies to 1.0 at some point :).
Related to https://github.com/nhellwig/tokio-cassandra/issues/16
The Travis build will need to be updated.
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/unix/bsd/freebsdlike/freebsd/mod.rs:436:1: 437:77 error: `#[deprecated]` attribute is unstable (see issue #29935)
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/unix/bsd/freebsdlike/freebsd/mod.rs:436 #[deprecated(since="0.2.34",
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/unix/bsd/freebsdlike/freebsd/mod.rs:437 note="please use the portable `IFF_RUNNING` constant instead")]
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs:26:9: 26:76 note: in this expansion of __cfg_if_apply! (defined in /home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs)
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in /home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs)
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/unix/bsd/freebsdlike/mod.rs:1110:1: 1120:2 note: in this expansion of cfg_if! (defined in /home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs)
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs:26:9: 26:76 note: in this expansion of __cfg_if_apply! (defined in /home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs)
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in /home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs)
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in /home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs)
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/unix/bsd/mod.rs:535:1: 549:2 note: in this expansion of cfg_if! (defined in /home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs)
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs:26:9: 26:76 note: in this expansion of __cfg_if_apply! (defined in /home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs)
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in /home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs)
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in /home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs)
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/unix/mod.rs:910:1: 941:2 note: in this expansion of cfg_if! (defined in /home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs)
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs:26:9: 26:76 note: in this expansion of __cfg_if_apply! (defined in /home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs)
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in /home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs)
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in /home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs)
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/lib.rs:282:1: 298:2 note: in this expansion of cfg_if! (defined in /home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs)
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/unix/bsd/freebsdlike/freebsd/mod.rs:443:1: 444:77 error: `#[deprecated]` attribute is unstable (see issue #29935)
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/unix/bsd/freebsdlike/freebsd/mod.rs:443 #[deprecated(since="0.2.34",
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/unix/bsd/freebsdlike/freebsd/mod.rs:444 note="please use the portable `IFF_OACTIVE` constant instead")]
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs:26:9: 26:76 note: in this expansion of __cfg_if_apply! (defined in /home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs)
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in /home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs)
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/unix/bsd/freebsdlike/mod.rs:1110:1: 1120:2 note: in this expansion of cfg_if! (defined in /home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs)
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs:26:9: 26:76 note: in this expansion of __cfg_if_apply! (defined in /home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs)
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in /home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs)
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in /home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs)
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/unix/bsd/mod.rs:535:1: 549:2 note: in this expansion of cfg_if! (defined in /home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs)
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs:26:9: 26:76 note: in this expansion of __cfg_if_apply! (defined in /home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs)
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in /home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs)
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in /home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs)
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/unix/mod.rs:910:1: 941:2 note: in this expansion of cfg_if! (defined in /home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs)
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs:26:9: 26:76 note: in this expansion of __cfg_if_apply! (defined in /home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs)
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in /home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs)
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in /home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs)
/home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/lib.rs:282:1: 298:2 note: in this expansion of cfg_if! (defined in /home/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.2.34/src/macros.rs)
error: aborting due to 2 previous errors
Related to https://github.com/slog-rs/term/issues/3
And implementation in golang:
I'm not personally knowledgeable of the development history of this vs the atty
crate, but we're in a weird situation in the Rust repository where the RLS uses isatty
and rustc/Cargo uses atty
(I think atty
is also used by ripgrep?). It looks like atty
differs namely in terms of "weird MSYS detection", although I suspect it's basically equivalent otherwise.
I'm curious, do you know the history here perhaps? I've been surprised by the sheer number of crates that do terminal things (and sad that some, not this library, have spotty support for some platforms). It'd be good if we could consolidate efforts perhaps!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.