From c26d159e310d03423ec53e60b4d3aa6348a55210 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Wed, 27 Nov 2024 08:39:58 +0100 Subject: [PATCH] remove atty crate --- Cargo.lock | 41 +++-------- Cargo.nix | 140 ++++++++++++-------------------------- chir-rs-config/Cargo.toml | 1 - chir-rs-config/src/lib.rs | 3 +- 4 files changed, 54 insertions(+), 131 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f309533..0b73e2e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -82,17 +82,6 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - [[package]] name = "autocfg" version = "1.4.0" @@ -281,9 +270,9 @@ dependencies = [ [[package]] name = "blake3" -version = "1.5.4" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d82033247fd8e890df8f740e407ad4d038debb9eb1f40533fffb32e7d17dc6f7" +checksum = "b8ee0c1824c4dea5b5f81736aff91bae041d2c07ee1192bec91054e10e3e601e" dependencies = [ "arrayref", "arrayvec", @@ -375,7 +364,6 @@ dependencies = [ name = "chir-rs-config" version = "0.1.0" dependencies = [ - "atty", "eyre", "sentry-core", "serde", @@ -903,15 +891,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "hermit-abi" version = "0.3.9" @@ -1277,9 +1256,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.165" +version = "0.2.166" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb4d3d38eab6c5239a362fa8bae48c03baf980a6e7079f063942d563ef3533e" +checksum = "c2ccc108bbc0b1331bd061864e7cd823c0cab660bbe6970e66e2c0614decde36" [[package]] name = "libloading" @@ -1439,7 +1418,7 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi", "libc", "wasi", "windows-sys 0.52.0", @@ -1524,7 +1503,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi", "libc", ] @@ -1943,9 +1922,9 @@ dependencies = [ [[package]] name = "rsa" -version = "0.9.6" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc" +checksum = "47c75d7c5c6b673e58bf54d8544a9f432e3a925b0e80f7cd3602ab5c50c55519" dependencies = [ "const-oid", "digest", @@ -2948,9 +2927,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.nix b/Cargo.nix index 3ed8eaa..8a8f00c 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -1,5 +1,6 @@ # This file was @generated by cargo2nix 0.11.0. # It is not intended to be manually edited. + args@{ release ? true, rootFeatures ? [ @@ -28,14 +29,14 @@ args@{ ignoreLockHash, }: let - nixifiedLockHash = "c852434b4158d757f3ce86a0514b1edb71bbc37ade477a95029fca8b40b142ee"; + nixifiedLockHash = "6abf8c67e884fa68365d556087a4405f08f2479a296fa27c9aa29b779d4d9aec"; workspaceSrc = if args.workspaceSrc == null then ./. else args.workspaceSrc; currentLockHash = builtins.hashFile "sha256" (workspaceSrc + /Cargo.lock); lockHashIgnored = if ignoreLockHash then builtins.trace "Ignoring lock hash" ignoreLockHash else ignoreLockHash; in if !lockHashIgnored && (nixifiedLockHash != currentLockHash) then - throw "Cargo.nix ${nixifiedLockHash} is out of sync with Cargo.lock ${currentLockHash}" + throw ("Cargo.nix ${nixifiedLockHash} is out of sync with Cargo.lock ${currentLockHash}") else let inherit (rustLib) @@ -56,10 +57,7 @@ else f: let drvs = genDrvsByProfile profilesByName ( - { - profile, - profileName, - }: + { profile, profileName }: mkRustCrate ( { inherit @@ -291,32 +289,6 @@ else }; }); - "registry+https://github.com/rust-lang/crates.io-index".atty."0.2.14" = - overridableMkRustCrate - (profileName: rec { - name = "atty"; - version = "0.2.14"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { - inherit name version; - sha256 = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"; - }; - dependencies = { - ${if hostPlatform.parsed.kernel.name == "hermit" then "hermit_abi" else null} = - (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hermit-abi."0.1.19" { - inherit profileName; - }).out; - ${if hostPlatform.isUnix then "libc" else null} = - (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.165" { - inherit profileName; - }).out; - ${if hostPlatform.isWindows then "winapi" else null} = - (rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi."0.3.9" { - inherit profileName; - }).out; - }; - }); - "registry+https://github.com/rust-lang/crates.io-index".autocfg."1.4.0" = overridableMkRustCrate (profileName: rec { @@ -374,7 +346,7 @@ else ]; dependencies = { libc = - (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.165" { + (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.166" { inherit profileName; }).out; paste = @@ -752,7 +724,7 @@ else else null } = - (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.165" { + (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.166" { inherit profileName; }).out; ${ @@ -981,15 +953,15 @@ else }; }); - "registry+https://github.com/rust-lang/crates.io-index".blake3."1.5.4" = + "registry+https://github.com/rust-lang/crates.io-index".blake3."1.5.5" = overridableMkRustCrate (profileName: rec { name = "blake3"; - version = "1.5.4"; + version = "1.5.5"; registry = "registry+https://github.com/rust-lang/crates.io-index"; src = fetchCratesIo { inherit name version; - sha256 = "d82033247fd8e890df8f740e407ad4d038debb9eb1f40533fffb32e7d17dc6f7"; + sha256 = "b8ee0c1824c4dea5b5f81736aff91bae041d2c07ee1192bec91054e10e3e601e"; }; features = builtins.concatLists [ [ "default" ] @@ -1109,7 +1081,7 @@ else inherit profileName; }).out; ${if hostPlatform.isUnix then "libc" else null} = - (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.165" { + (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.166" { inherit profileName; }).out; shlex = @@ -1216,10 +1188,6 @@ else registry = "unknown"; src = fetchCrateLocal (workspaceSrc + "/chir-rs-config"); dependencies = { - atty = - (rustPackages."registry+https://github.com/rust-lang/crates.io-index".atty."0.2.14" { - inherit profileName; - }).out; eyre = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".eyre."0.6.12" { inherit profileName; @@ -1250,7 +1218,7 @@ else inherit profileName; }).out; blake3 = - (rustPackages."registry+https://github.com/rust-lang/crates.io-index".blake3."1.5.4" { + (rustPackages."registry+https://github.com/rust-lang/crates.io-index".blake3."1.5.5" { inherit profileName; }).out; eyre = @@ -1424,7 +1392,7 @@ else inherit profileName; }).out; libc = - (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.165" { + (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.166" { inherit profileName; }).out; libloading = @@ -1610,7 +1578,7 @@ else else null } = - (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.165" { + (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.166" { inherit profileName; }).out; }; @@ -1985,7 +1953,7 @@ else else null } = - (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.165" { + (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.166" { inherit profileName; }).out; ${if hostPlatform.isWindows then "windows_sys" else null} = @@ -2117,7 +2085,7 @@ else inherit profileName; }).out; libc = - (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.165" { + (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.166" { inherit profileName; }).out; ${if hostPlatform.parsed.kernel.name == "windows" then "winapi" else null} = @@ -2489,7 +2457,7 @@ else inherit profileName; }).out; ${if hostPlatform.isUnix then "libc" else null} = - (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.165" { + (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.166" { inherit profileName; }).out; ${if hostPlatform.parsed.kernel.name == "wasi" then "wasi" else null} = @@ -2668,27 +2636,6 @@ else }; }); - "registry+https://github.com/rust-lang/crates.io-index".hermit-abi."0.1.19" = - overridableMkRustCrate - (profileName: rec { - name = "hermit-abi"; - version = "0.1.19"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { - inherit name version; - sha256 = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"; - }; - features = builtins.concatLists [ - [ "default" ] - ]; - dependencies = { - libc = - (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.165" { - inherit profileName; - }).out; - }; - }); - "registry+https://github.com/rust-lang/crates.io-index".hermit-abi."0.3.9" = overridableMkRustCrate (profileName: rec { @@ -2797,7 +2744,7 @@ else inherit profileName; }).out; ${if hostPlatform.isUnix || hostPlatform.parsed.kernel.name == "redox" then "libc" else null} = - (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.165" { + (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.166" { inherit profileName; }).out; ${if hostPlatform.parsed.kernel.name == "windows" then "windows" else null} = @@ -3608,7 +3555,7 @@ else }; dependencies = { ${if hostPlatform.isUnix then "libc" else null} = - (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.165" { + (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.166" { inherit profileName; }).out; }; @@ -3666,18 +3613,17 @@ else }; }); - "registry+https://github.com/rust-lang/crates.io-index".libc."0.2.165" = + "registry+https://github.com/rust-lang/crates.io-index".libc."0.2.166" = overridableMkRustCrate (profileName: rec { name = "libc"; - version = "0.2.165"; + version = "0.2.166"; registry = "registry+https://github.com/rust-lang/crates.io-index"; src = fetchCratesIo { inherit name version; - sha256 = "fcb4d3d38eab6c5239a362fa8bae48c03baf980a6e7079f063942d563ef3533e"; + sha256 = "c2ccc108bbc0b1331bd061864e7cd823c0cab660bbe6970e66e2c0614decde36"; }; features = builtins.concatLists [ - [ "const-extern-fn" ] [ "default" ] [ "extra_traits" ] [ "std" ] @@ -4119,7 +4065,7 @@ else inherit profileName; }).out; ${if hostPlatform.isUnix || hostPlatform.parsed.kernel.name == "wasi" then "libc" else null} = - (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.165" { + (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.166" { inherit profileName; }).out; ${if hostPlatform.parsed.kernel.name == "wasi" then "wasi" else null} = @@ -4346,7 +4292,7 @@ else inherit profileName; }).out; ${if !hostPlatform.isWindows then "libc" else null} = - (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.165" { + (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.166" { inherit profileName; }).out; }; @@ -4505,7 +4451,7 @@ else inherit profileName; }).out; ${if hostPlatform.isUnix then "libc" else null} = - (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.165" { + (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.166" { inherit profileName; }).out; ${if hostPlatform.parsed.kernel.name == "redox" then "syscall" else null} = @@ -4831,7 +4777,7 @@ else else null } = - (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.165" { + (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.166" { inherit profileName; }).out; once_cell = @@ -5014,7 +4960,7 @@ else ]; dependencies = { libc = - (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.165" { + (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.166" { inherit profileName; }).out; ${if hostPlatform.isWindows then "once_cell" else null} = @@ -5085,7 +5031,7 @@ else ]; dependencies = { ${if hostPlatform.isUnix then "libc" else null} = - (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.165" { + (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.166" { inherit profileName; }).out; rand_chacha = @@ -5558,7 +5504,7 @@ else else null } = - (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.165" { + (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.166" { inherit profileName; }).out; ${ @@ -5598,15 +5544,15 @@ else }; }); - "registry+https://github.com/rust-lang/crates.io-index".rsa."0.9.6" = + "registry+https://github.com/rust-lang/crates.io-index".rsa."0.9.7" = overridableMkRustCrate (profileName: rec { name = "rsa"; - version = "0.9.6"; + version = "0.9.7"; registry = "registry+https://github.com/rust-lang/crates.io-index"; src = fetchCratesIo { inherit name version; - sha256 = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc"; + sha256 = "47c75d7c5c6b673e58bf54d8544a9f432e3a925b0e80f7cd3602ab5c50c55519"; }; features = builtins.concatLists [ [ "default" ] @@ -5825,7 +5771,7 @@ else else null } = - (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.165" { + (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.166" { inherit profileName; }).out; ${ @@ -6232,7 +6178,7 @@ else inherit profileName; }).out; libc = - (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.165" { + (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.166" { inherit profileName; }).out; ${if hostPlatform.isWindows then "os_info" else null} = @@ -6885,7 +6831,7 @@ else ]; dependencies = { ${if hostPlatform.isUnix then "libc" else null} = - (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.165" { + (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.166" { inherit profileName; }).out; ${if hostPlatform.isWindows then "windows_sys" else null} = @@ -7427,7 +7373,7 @@ else inherit profileName; }).out; rsa = - (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rsa."0.9.6" { + (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rsa."0.9.7" { inherit profileName; }).out; serde = @@ -8180,7 +8126,7 @@ else inherit profileName; }).out; ${if hostPlatform.isUnix then "libc" else null} = - (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.165" { + (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.166" { inherit profileName; }).out; mio = @@ -8671,7 +8617,7 @@ else }).out; tracing_attributes = ( - buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing-attributes."0.1.27" + buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing-attributes."0.1.28" { profileName = "__noProfile"; } ).out; tracing_core = @@ -8681,15 +8627,15 @@ else }; }); - "registry+https://github.com/rust-lang/crates.io-index".tracing-attributes."0.1.27" = + "registry+https://github.com/rust-lang/crates.io-index".tracing-attributes."0.1.28" = overridableMkRustCrate (profileName: rec { name = "tracing-attributes"; - version = "0.1.27"; + version = "0.1.28"; registry = "registry+https://github.com/rust-lang/crates.io-index"; src = fetchCratesIo { inherit name version; - sha256 = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"; + sha256 = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d"; }; dependencies = { proc_macro2 = @@ -8936,7 +8882,7 @@ else }; dependencies = { libc = - (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.165" { + (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.166" { inherit profileName; }).out; }; @@ -9610,13 +9556,10 @@ else [ "handleapi" ] [ "libloaderapi" ] [ "memoryapi" ] - [ "minwinbase" ] - [ "minwindef" ] [ "processenv" ] [ "processthreadsapi" ] [ "profileapi" ] [ "psapi" ] - [ "winbase" ] ]; dependencies = { ${if hostPlatform.config == "i686-pc-windows-gnu" then "winapi_i686_pc_windows_gnu" else null} = @@ -10504,4 +10447,5 @@ else }).out; }; }); + } diff --git a/chir-rs-config/Cargo.toml b/chir-rs-config/Cargo.toml index f35e9c4..a099b14 100644 --- a/chir-rs-config/Cargo.toml +++ b/chir-rs-config/Cargo.toml @@ -4,7 +4,6 @@ version = "0.1.0" edition = "2021" [dependencies] -atty = "0.2.14" eyre = "0.6.12" sentry-core = "0.34.0" serde = { version = "1.0.215", features = ["derive"] } diff --git a/chir-rs-config/src/lib.rs b/chir-rs-config/src/lib.rs index d0f41e1..78bd612 100644 --- a/chir-rs-config/src/lib.rs +++ b/chir-rs-config/src/lib.rs @@ -1,6 +1,7 @@ //! Configuration file support use std::{ + io::IsTerminal, net::SocketAddr, path::{Path, PathBuf}, }; @@ -39,7 +40,7 @@ pub enum LogFormat { impl Default for LogFormat { fn default() -> Self { - if atty::is(atty::Stream::Stdout) { + if std::io::stdout().is_terminal() { #[cfg(debug_assertions)] { Self::Pretty