ducaale / xh

Friendly and fast tool for sending HTTP requests
MIT License
4.96k stars 90 forks source link

Install 0.19.3 fails #333

Closed jayvdb closed 8 months ago

jayvdb commented 8 months ago

Installing from crates.io and git (rustup run stable cargo install --path .) fails. I'm on Linux.

> rustup run stable cargo install xh
    Updating crates.io index
  Downloaded xh v0.19.3
  Downloaded 1 crate (286.2 KB) in 2.43s
  Installing xh v0.19.3
    Updating crates.io index
  Downloaded cookie_store v0.16.2
  Downloaded thiserror v1.0.50
  Downloaded socket2 v0.4.10
  Downloaded tracing v0.1.40
  Downloaded hashbrown v0.14.2
  Downloaded rustix v0.38.20
  Downloaded terminal_size v0.3.0
  Downloaded thiserror-impl v1.0.50
  Downloaded plist v1.5.0
  Downloaded webpki-roots v0.25.2
  Downloaded quick-xml v0.29.0
  Downloaded digest_auth v0.3.1
  Downloaded cpufeatures v0.2.10
  Downloaded socket2 v0.5.5
  Downloaded 14 crates (1.2 MB) in 2.06s
   Compiling libc v0.2.149
   Compiling version_check v0.9.4
   Compiling proc-macro2 v1.0.69
   Compiling unicode-ident v1.0.12
   Compiling autocfg v1.1.0
   Compiling serde v1.0.189
   Compiling once_cell v1.18.0
   Compiling itoa v1.0.9
   Compiling time-core v0.1.2
   Compiling cfg-if v1.0.0
   Compiling memchr v2.6.4
   Compiling pkg-config v0.3.27
   Compiling pin-project-lite v0.2.13
   Compiling futures-core v0.3.28
   Compiling tinyvec_macros v0.1.1
   Compiling bytes v1.5.0
   Compiling crc32fast v1.3.2
   Compiling powerfmt v0.2.0
   Compiling typenum v1.17.0
   Compiling tinyvec v1.6.0
   Compiling unicode-bidi v0.3.13
   Compiling time-macros v0.2.15
   Compiling percent-encoding v2.3.0
   Compiling hashbrown v0.12.3
   Compiling futures-task v0.3.28
   Compiling deranged v0.3.9
   Compiling fnv v1.0.7
   Compiling futures-util v0.3.28
   Compiling spin v0.5.2
   Compiling unicase v2.7.0
   Compiling generic-array v0.14.7
   Compiling untrusted v0.7.1
   Compiling indexmap v1.9.3
   Compiling slab v0.4.9
   Compiling tracing-core v0.1.32
   Compiling log v0.4.20
   Compiling ryu v1.0.15
   Compiling serde_json v1.0.107
   Compiling hashbrown v0.14.2
   Compiling futures-io v0.3.28
   Compiling equivalent v1.0.1
   Compiling quote v1.0.33
   Compiling pin-utils v0.1.0
   Compiling tracing v0.1.40
   Compiling syn v2.0.38
   Compiling socket2 v0.5.5
   Compiling cc v1.0.83
   Compiling num_cpus v1.16.0
   Compiling mio v0.8.8
   Compiling http v0.2.9
   Compiling form_urlencoded v1.2.0
   Compiling adler v1.0.2
   Compiling unicode-normalization v0.1.22
   Compiling httparse v1.8.0
   Compiling indexmap v2.0.2
   Compiling futures-sink v0.3.28
   Compiling tokio v1.33.0
   Compiling safemem v0.3.3
   Compiling base64 v0.21.4
   Compiling rustls v0.21.7
   Compiling futures-channel v0.3.28
   Compiling thiserror v1.0.50
   Compiling rustix v0.38.20
   Compiling time v0.3.30
   Compiling idna v0.3.0
   Compiling idna v0.4.0
   Compiling quick-xml v0.29.0
   Compiling crypto-common v0.1.6
   Compiling block-buffer v0.10.4
   Compiling onig_sys v69.8.1
   Compiling ring v0.16.20
   Compiling line-wrap v0.1.1
   Compiling miniz_oxide v0.7.1
   Compiling getrandom v0.2.10
   Compiling cookie v0.16.2
   Compiling regex-syntax v0.8.2
   Compiling linux-raw-sys v0.4.10
   Compiling try-lock v0.2.4
   Compiling linked-hash-map v0.5.6
   Compiling psl-types v2.0.11
   Compiling same-file v1.0.6
   Compiling utf8parse v0.2.1
   Compiling bitflags v2.4.1
   Compiling bitflags v1.3.2
   Compiling walkdir v2.4.0
   Compiling anstyle-parse v0.2.2
   Compiling yaml-rust v0.4.5
   Compiling publicsuffix v2.2.3
   Compiling want v0.3.1
   Compiling flate2 v1.0.28
   Compiling mime_guess v2.0.4
   Compiling rand_core v0.6.4
   Compiling url v2.4.1
   Compiling bincode v1.3.3
   Compiling digest v0.10.7
   Compiling regex-automata v0.4.3
   Compiling plist v1.5.0
   Compiling http-body v0.4.5
   Compiling socket2 v0.4.10
   Compiling cookie v0.17.0
   Compiling encoding_rs v0.8.33
   Compiling colorchoice v1.0.0
   Compiling matches v0.1.10
   Compiling lazycell v1.3.0
   Compiling anstyle v1.0.4
   Compiling regex-syntax v0.6.29
   Compiling tower-service v0.3.2
   Compiling lazy_static v1.4.0
   Compiling ppv-lite86 v0.2.17
   Compiling httpdate v1.0.3
   Compiling alloc-no-stdlib v2.0.4
   Compiling anstyle-query v1.0.0
   Compiling unicode-width v0.1.11
   Compiling anstream v0.6.4
   Compiling alloc-stdlib v0.2.2
   Compiling idna v0.2.3
   Compiling tokio-util v0.7.9
   Compiling rand_chacha v0.3.1
   Compiling terminal_size v0.3.0
   Compiling rustls-pemfile v1.0.3
   Compiling regex v1.10.2
   Compiling network-interface v1.0.3
   Compiling openssl-probe v0.1.5
   Compiling serde_derive v1.0.189
   Compiling futures-macro v0.3.28
   Compiling thiserror-impl v1.0.50
   Compiling strsim v0.10.0
   Compiling onig v6.4.0
   Compiling cpufeatures v0.2.10
   Compiling mime v0.3.17
   Compiling clap_lex v0.5.1
   Compiling either v1.9.0
   Compiling heck v0.4.1
   Compiling anyhow v1.0.75
   Compiling clap_builder v4.4.6
   Compiling clap_derive v4.4.2
   Compiling sha2 v0.10.8
   Compiling rustls-native-certs v0.6.3
   Compiling rand v0.8.5
   Compiling brotli-decompressor v2.5.0
   Compiling console v0.15.7
   Compiling getopts v0.2.21
   Compiling serde_urlencoded v0.7.1
   Compiling md-5 v0.10.6
   Compiling dirs-sys v0.3.7
   Compiling base64 v0.13.1
   Compiling sct v0.7.0
   Compiling rustls-webpki v0.101.6
   Compiling h2 v0.3.21
   Compiling tokio-socks v0.5.1
   Compiling ipnet v2.8.0
   Compiling webpki-roots v0.25.2
   Compiling number_prefix v0.4.0
   Compiling hex v0.4.3
   Compiling syntect v4.6.0
   Compiling cookie_store v0.16.2
   Compiling digest_auth v0.3.1
   Compiling cookie_store v0.20.0
   Compiling indicatif v0.16.2
   Compiling clap v4.4.6
   Compiling pem v0.8.3
   Compiling dirs v3.0.2
   Compiling brotli v3.4.0
   Compiling jsonxf v1.1.1
   Compiling hyper v0.14.27
   Compiling tokio-rustls v0.24.1
   Compiling encoding_rs_io v0.1.7
   Compiling xh v0.19.3
   Compiling chardetng v0.1.17
   Compiling os_display v0.1.3
   Compiling atty v0.2.14
   Compiling rpassword v5.0.1
   Compiling mime2ext v0.1.52
   Compiling termcolor v1.3.0
   Compiling hyper-rustls v0.24.1
   Compiling reqwest v0.11.22
error: cannot find derive macro `Deserialize` in this scope
   --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/cli.rs:606:10
    |
606 | #[derive(Deserialize)]
    |          ^^^^^^^^^^^
    |
note: `Deserialize` is imported here, but it is only a trait, without a derive macro
   --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/cli.rs:16:5
    |
16  | use serde::Deserialize;
    |     ^^^^^^^^^^^^^^^^^^

error: cannot find derive macro `Serialize` in this scope
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:16:17
   |
16 | #[derive(Debug, Serialize, Deserialize)]
   |                 ^^^^^^^^^
   |
note: `Serialize` is imported here, but it is only a trait, without a derive macro
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:10:26
   |
10 | use serde::{Deserialize, Serialize};
   |                          ^^^^^^^^^

error: cannot find derive macro `Deserialize` in this scope
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:16:28
   |
16 | #[derive(Debug, Serialize, Deserialize)]
   |                            ^^^^^^^^^^^
   |
note: `Deserialize` is imported here, but it is only a trait, without a derive macro
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:10:13
   |
10 | use serde::{Deserialize, Serialize};
   |             ^^^^^^^^^^^

error: cannot find attribute `serde` in this scope
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:17:3
   |
17 | #[serde(untagged)]
   |   ^^^^^
   |
   = note: `serde` is in scope, but it is a crate, not an attribute

error: cannot find derive macro `Serialize` in this scope
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:40:41
   |
40 | #[derive(Default, Debug, PartialEq, Eq, Serialize, Deserialize)]
   |                                         ^^^^^^^^^
   |
note: `Serialize` is imported here, but it is only a trait, without a derive macro
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:10:26
   |
10 | use serde::{Deserialize, Serialize};
   |                          ^^^^^^^^^

error: cannot find derive macro `Deserialize` in this scope
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:40:52
   |
40 | #[derive(Default, Debug, PartialEq, Eq, Serialize, Deserialize)]
   |                                                    ^^^^^^^^^^^
   |
note: `Deserialize` is imported here, but it is only a trait, without a derive macro
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:10:13
   |
10 | use serde::{Deserialize, Serialize};
   |             ^^^^^^^^^^^

error: cannot find attribute `serde` in this scope
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:42:7
   |
42 |     #[serde(rename = "type")]
   |       ^^^^^
   |
   = note: `serde` is in scope, but it is a crate, not an attribute

error: cannot find derive macro `Serialize` in this scope
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:48:39
   |
48 | #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
   |                                       ^^^^^^^^^
   |
note: `Serialize` is imported here, but it is only a trait, without a derive macro
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:10:26
   |
10 | use serde::{Deserialize, Serialize};
   |                          ^^^^^^^^^

error: cannot find derive macro `Deserialize` in this scope
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:48:50
   |
48 | #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
   |                                                  ^^^^^^^^^^^
   |
note: `Deserialize` is imported here, but it is only a trait, without a derive macro
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:10:13
   |
10 | use serde::{Deserialize, Serialize};
   |             ^^^^^^^^^^^

error: cannot find attribute `serde` in this scope
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:51:7
   |
51 |     #[serde(skip_serializing_if = "Option::is_none")]
   |       ^^^^^
   |
   = note: `serde` is in scope, but it is a crate, not an attribute

error: cannot find attribute `serde` in this scope
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:53:7
   |
53 |     #[serde(skip_serializing_if = "Option::is_none")]
   |       ^^^^^
   |
   = note: `serde` is in scope, but it is a crate, not an attribute

error: cannot find attribute `serde` in this scope
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:55:7
   |
55 |     #[serde(skip_serializing_if = "Option::is_none")]
   |       ^^^^^
   |
   = note: `serde` is in scope, but it is a crate, not an attribute

error: cannot find derive macro `Serialize` in this scope
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:59:39
   |
59 | #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
   |                                       ^^^^^^^^^
   |
note: `Serialize` is imported here, but it is only a trait, without a derive macro
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:10:26
   |
10 | use serde::{Deserialize, Serialize};
   |                          ^^^^^^^^^

error: cannot find derive macro `Deserialize` in this scope
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:59:50
   |
59 | #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
   |                                                  ^^^^^^^^^^^
   |
note: `Deserialize` is imported here, but it is only a trait, without a derive macro
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:10:13
   |
10 | use serde::{Deserialize, Serialize};
   |             ^^^^^^^^^^^

error: cannot find attribute `serde` in this scope
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:63:7
   |
63 |     #[serde(skip_serializing_if = "Option::is_none")]
   |       ^^^^^
   |
   = note: `serde` is in scope, but it is a crate, not an attribute

error: cannot find attribute `serde` in this scope
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:65:7
   |
65 |     #[serde(skip_serializing_if = "Option::is_none")]
   |       ^^^^^
   |
   = note: `serde` is in scope, but it is a crate, not an attribute

error: cannot find attribute `serde` in this scope
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:67:7
   |
67 |     #[serde(skip_serializing_if = "Option::is_none")]
   |       ^^^^^
   |
   = note: `serde` is in scope, but it is a crate, not an attribute

error: cannot find attribute `serde` in this scope
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:69:7
   |
69 |     #[serde(skip_serializing_if = "Option::is_none")]
   |       ^^^^^
   |
   = note: `serde` is in scope, but it is a crate, not an attribute

error: cannot find derive macro `Serialize` in this scope
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:73:17
   |
73 | #[derive(Debug, Serialize, Deserialize)]
   |                 ^^^^^^^^^
   |
note: `Serialize` is imported here, but it is only a trait, without a derive macro
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:10:26
   |
10 | use serde::{Deserialize, Serialize};
   |                          ^^^^^^^^^

error: cannot find derive macro `Deserialize` in this scope
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:73:28
   |
73 | #[derive(Debug, Serialize, Deserialize)]
   |                            ^^^^^^^^^^^
   |
note: `Deserialize` is imported here, but it is only a trait, without a derive macro
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:10:13
   |
10 | use serde::{Deserialize, Serialize};
   |             ^^^^^^^^^^^

error: cannot find attribute `serde` in this scope
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:74:3
   |
74 | #[serde(untagged)]
   |   ^^^^^
   |
   = note: `serde` is in scope, but it is a crate, not an attribute

error: cannot find derive macro `Serialize` in this scope
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:88:17
   |
88 | #[derive(Debug, Serialize, Deserialize)]
   |                 ^^^^^^^^^
   |
note: `Serialize` is imported here, but it is only a trait, without a derive macro
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:10:26
   |
10 | use serde::{Deserialize, Serialize};
   |                          ^^^^^^^^^

error: cannot find derive macro `Deserialize` in this scope
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:88:28
   |
88 | #[derive(Debug, Serialize, Deserialize)]
   |                            ^^^^^^^^^^^
   |
note: `Deserialize` is imported here, but it is only a trait, without a derive macro
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:10:13
   |
10 | use serde::{Deserialize, Serialize};
   |             ^^^^^^^^^^^

error: cannot find derive macro `Serialize` in this scope
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:94:17
   |
94 | #[derive(Debug, Serialize, Deserialize)]
   |                 ^^^^^^^^^
   |
note: `Serialize` is imported here, but it is only a trait, without a derive macro
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:10:26
   |
10 | use serde::{Deserialize, Serialize};
   |                          ^^^^^^^^^

error: cannot find derive macro `Deserialize` in this scope
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:94:28
   |
94 | #[derive(Debug, Serialize, Deserialize)]
   |                            ^^^^^^^^^^^
   |
note: `Deserialize` is imported here, but it is only a trait, without a derive macro
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:10:13
   |
10 | use serde::{Deserialize, Serialize};
   |             ^^^^^^^^^^^

error: cannot find attribute `serde` in this scope
  --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:95:3
   |
95 | #[serde(untagged)]
   |   ^^^^^
   |
   = note: `serde` is in scope, but it is a crate, not an attribute

error: cannot find derive macro `Serialize` in this scope
   --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:109:26
    |
109 | #[derive(Debug, Default, Serialize, Deserialize)]
    |                          ^^^^^^^^^
    |
note: `Serialize` is imported here, but it is only a trait, without a derive macro
   --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:10:26
    |
10  | use serde::{Deserialize, Serialize};
    |                          ^^^^^^^^^

error: cannot find derive macro `Deserialize` in this scope
   --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:109:37
    |
109 | #[derive(Debug, Default, Serialize, Deserialize)]
    |                                     ^^^^^^^^^^^
    |
note: `Deserialize` is imported here, but it is only a trait, without a derive macro
   --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:10:13
    |
10  | use serde::{Deserialize, Serialize};
    |             ^^^^^^^^^^^

error: cannot find attribute `serde` in this scope
   --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:111:7
    |
111 |     #[serde(rename = "__meta__")]
    |       ^^^^^
    |
    = note: `serde` is in scope, but it is a crate, not an attribute

error[E0277]: the trait bound `cli::Config: Deserialize<'_>` is not satisfied
    --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/cli.rs:626:11
     |
626  |     match serde_json::from_str::<Config>(&content) {
     |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Deserialize<'_>` is not implemented for `cli::Config`
     |
     = help: the following other types implement trait `Deserialize<'de>`:
               bool
               char
               isize
               i8
               i16
               i32
               i64
               i128
             and 170 others
note: required by a bound in `serde_json::from_str`
    --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde_json-1.0.107/src/de.rs:2675:8
     |
2673 | pub fn from_str<'a, T>(s: &'a str) -> Result<T>
     |        -------- required by a bound in this function
2674 | where
2675 |     T: de::Deserialize<'a>,
     |        ^^^^^^^^^^^^^^^^^^^ required by this bound in `from_str`

error[E0277]: the trait bound `session::Content: Deserialize<'_>` is not satisfied
    --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:181:28
     |
181  |             Ok(content) => serde_json::from_str::<Content>(&content)?.migrate(),
     |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Deserialize<'_>` is not implemented for `session::Content`
     |
     = help: the following other types implement trait `Deserialize<'de>`:
               bool
               char
               isize
               i8
               i16
               i32
               i64
               i128
             and 170 others
note: required by a bound in `serde_json::from_str`
    --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde_json-1.0.107/src/de.rs:2675:8
     |
2673 | pub fn from_str<'a, T>(s: &'a str) -> Result<T>
     |        -------- required by a bound in this function
2674 | where
2675 |     T: de::Deserialize<'a>,
     |        ^^^^^^^^^^^^^^^^^^^ required by this bound in `from_str`

error[E0599]: no method named `serialize` found for struct `session::Content` in the current scope
   --> /home/jayvdb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xh-0.19.3/src/session.rs:352:26
    |
110 | struct Content {
    | -------------- method `serialize` not found for this struct
...
352 |             self.content.serialize(&mut ser)?;
    |                          ^^^^^^^^^ method not found in `Content`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following traits define an item `serialize`, perhaps you need to implement one of them:
            candidate #1: `Serialize`
            candidate #2: `bincode::config::Options`
help: one of the expressions' fields has a method of the same name
    |
352 |             self.content.auth.auth_type.serialize(&mut ser)?;
    |                          +++++++++++++++

Some errors have detailed explanations: E0277, E0599.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `xh` (bin "xh") due to 32 previous errors
error: failed to compile `xh v0.19.3`, intermediate artifacts can be found at `/tmp/cargo-installsHCmll`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path
mo8it commented 8 months ago

I can confirm this trying to install xh from crates.io. Also on Linux with the latest stable Rust version.

blyxxyz commented 8 months ago

Ouch! I'm guessing we depend on a crate that used to enable the feature and now doesn't.

Maybe cargo update should be part of the release checklist.

ducaale commented 8 months ago

@blyxxyz I wasn't aware but it looks like cargo-install respects any present Cargo.lock file when the --locked option is used. Do you see any downsides in recommending that instead?

blyxxyz commented 8 months ago

It means people will miss out on bug fixes, and not everybody is going to notice it. But I've seen packages that recommend it. Some of the distro packages already build with --locked.

It's good practice either way to regularly run cargo update and watch out for vulnerabilities. But with --locked it would be even more important.

I don't have a strong opinion for or against.

jayvdb commented 8 months ago

It would likely be useful to add resolver = "2" to Cargo.toml to use the stricter dependency resolver.

blyxxyz commented 8 months ago

Hm, seems that it wouldn't have caught this problem but that sounds like a good idea.

0323pin commented 8 months ago

Just the view of a package maintainer here ... Releases need to be built with --locked or --offline when it comes to packaging. This because, there are basically 3 phases of a package build; fetch, build and install.

At least on NetBSD, the fetch phase fetches the source files into the build directory. During the build phase, dowloads are not allowed, only what was already downloaded during fetch is supposed to be used. So, if extra source files are needed, the build will fail.

Not all packaging systems are that strict but, I think it's good that we do it this way. When we fetch source files, we also calculate checksums, so if a file has been altered the build will fail due to a checksum mismatch. This way, we can improve security by only using files that have a checksum assigned.

ducaale commented 8 months ago

It would likely be useful to add resolver = "2" to Cargo.toml to use the stricter dependency resolver.

We're on edition 2021, so it should default to the newer resolver (I think)

By the way, how helpful do you find our MSRV policy? We could periodically run cargo update but that means we would raise the minimum supported Rust version more often.

Also, I noticed that installing xh from crates.io without the --locked flag requires at least 1.70 but our stated MSRV is 1.64.

0323pin commented 8 months ago

Also, I noticed that installing xh from crates.io without the --locked flag requires at least 1.70 but our stated MSRV is 1.64.

As long as it states the actually required MSRV it's fine. Personally, I'm nearly always on the latest stable but, NetBSD itself is usually on latest -1.

Right now, I'm on 1.73 and NetBSD is on 1.71.1. So, I like when projects state MSRV, so I don't push things that build on my dev system but, fail on the build servers.

jayvdb commented 8 months ago

The fix has been merged, but there isn't a release yet. My workflows using xh are failing.

jayvdb commented 8 months ago

Thanks. v0.19.4 has been released with just this one fix.

ducaale commented 8 months ago

I have now added cargo update to our release checklist file.

We will also start updating dependencies more aggressively and encourage people to use the --locked option when installing xh from crates.io.