Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install bat 0.18.2 with rust 1.54 #1796

Closed
Frago9876543210 opened this issue Aug 12, 2021 · 5 comments
Closed

Can't install bat 0.18.2 with rust 1.54 #1796

Frago9876543210 opened this issue Aug 12, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@Frago9876543210
Copy link

Describe the bug you encountered:

    Updating crates.io index
  Installing bat v0.18.2
   Compiling libc v0.2.95
   Compiling autocfg v1.0.1
   Compiling proc-macro2 v1.0.26
   Compiling unicode-xid v0.2.2
   Compiling syn v1.0.72
   Compiling pkg-config v0.3.19
   Compiling bitflags v1.2.1
   Compiling cfg-if v1.0.0
   Compiling memchr v2.4.0
   Compiling serde_derive v1.0.126
   Compiling serde v1.0.126
   Compiling lazy_static v1.4.0
   Compiling encoding_index_tests v0.1.4
   Compiling tinyvec_macros v0.1.0
   Compiling regex-syntax v0.6.25
   Compiling proc-macro-hack v0.5.19
   Compiling matches v0.1.8
   Compiling log v0.4.14
   Compiling crc32fast v1.2.1
   Compiling ryu v1.0.5
   Compiling byteorder v1.4.3
   Compiling unicode-width v0.1.8
   Compiling safemem v0.3.3
   Compiling percent-encoding v2.1.0
   Compiling adler v1.0.2
   Compiling linked-hash-map v0.5.4
   Compiling version_check v0.9.3
   Compiling serde_json v1.0.64
   Compiling ansi_term v0.11.0
   Compiling strsim v0.8.0
   Compiling fnv v1.0.7
   Compiling vec_map v0.8.2
   Compiling ucd-trie v0.1.3
   Compiling same-file v1.0.6
   Compiling hashbrown v0.9.1
   Compiling base64 v0.13.0
   Compiling itoa v0.4.7
   Compiling bugreport v0.4.0
   Compiling xml-rs v0.8.3
   Compiling termcolor v1.1.2
   Compiling std_prelude v0.2.12
   Compiling lazycell v1.3.0
   Compiling dtoa v0.4.8
   Compiling shell-escape v0.1.5
   Compiling wild v2.0.4
   Compiling ansi_term v0.12.1
   Compiling shell-words v1.0.0
   Compiling num-traits v0.2.14
   Compiling num-integer v0.1.44
   Compiling miniz_oxide v0.4.4
   Compiling indexmap v1.6.2
   Compiling encoding-index-japanese v1.20141219.5
   Compiling encoding-index-korean v1.20141219.5
   Compiling encoding-index-tradchinese v1.20141219.5
   Compiling encoding-index-singlebyte v1.20141219.5
   Compiling encoding-index-simpchinese v1.20141219.5
   Compiling tinyvec v1.2.0
   Compiling unicode-bidi v0.3.5
   Compiling regex-automata v0.1.9
   Compiling line-wrap v0.1.1
   Compiling form_urlencoded v1.0.1
   Compiling yaml-rust v0.4.5
   Compiling error-chain v0.12.4
   Compiling walkdir v2.3.2
   Compiling pest v2.1.3
   Compiling path_abs v0.5.1
   Compiling encoding v0.2.33
   Compiling unicode-normalization v0.1.17
   Compiling quote v1.0.9
   Compiling semver-parser v0.10.2
   Compiling jobserver v0.1.22
   Compiling term_size v0.3.2
   Compiling atty v0.2.14
   Compiling dirs-sys-next v0.1.2
   Compiling terminal_size v0.1.16
   Compiling aho-corasick v0.7.18
   Compiling bstr v0.2.16
   Compiling content_inspector v0.2.4
   Compiling cc v1.0.67
   Compiling semver v0.11.0
   Compiling textwrap v0.11.0
   Compiling idna v0.2.3
   Compiling dirs-next v2.0.0
   Compiling flate2 v1.0.20
   Compiling regex v1.5.4
   Compiling clap v2.33.3
   Compiling libz-sys v1.1.3
   Compiling onig_sys v69.6.0
   Compiling sys-info v0.9.0
   Compiling libgit2-sys v0.12.20+1.1.0
   Compiling ansi_colours v1.0.4
   Compiling url v2.2.2
   Compiling chrono v0.4.19
   Compiling globset v0.4.8
   Compiling console v0.14.1
   Compiling git-version-macro v0.3.4
   Compiling grep-cli v0.1.6
   Compiling bat v0.18.2
   Compiling git-version v0.3.4
   Compiling onig v6.1.1
   Compiling bincode v1.3.3
   Compiling plist v1.1.0
   Compiling clircle v0.3.0
   Compiling serde_yaml v0.8.17
   Compiling syntect v4.5.0
   Compiling git2 v0.13.19
error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
  --> /home/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.13.19/src/attr.rs:74:15
   |
74 |         match (self, other) {
   |               ^^^^^^^^^^^^^
   |
note: first, the lifetime cannot outlive the anonymous lifetime defined on the method body at 73:26...
  --> /home/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.13.19/src/attr.rs:73:26
   |
73 |     fn eq(&self, other: &AttrValue<'_>) -> bool {
   |                          ^^^^^^^^^^^^^
note: ...so that the types are compatible
  --> /home/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.13.19/src/attr.rs:74:15
   |
74 |         match (self, other) {
   |               ^^^^^^^^^^^^^
   = note: expected `(&AttrValue<'_>, &AttrValue<'_>)`
              found `(&AttrValue<'_>, &AttrValue<'_>)`
note: but, the lifetime must be valid for the lifetime `'_` as defined on the impl at 72:30...
  --> /home/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.13.19/src/attr.rs:72:30
   |
72 | impl PartialEq for AttrValue<'_> {
   |                              ^^
note: ...so that the types are compatible
  --> /home/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.13.19/src/attr.rs:79:16
   |
79 |             | (Self::Bytes(bytes), AttrValue::String(string)) => string.as_bytes() == *bytes,
   |                ^^^^^^^^^^^^^^^^^^
   = note: expected `AttrValue<'_>`
              found `AttrValue<'_>`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0495`.
error: failed to compile `bat v0.18.2`, intermediate artifacts can be found at `/tmp/cargo-installVLhnJX`

Caused by:
  could not compile `git2`

To learn more, run the command again with --verbose.

What did you expect to happen instead?

Successful install of bat

How did you install bat?

cargo install --locked bat

bat version and environment

$ cargo --version --verbose
cargo 1.54.0 (5ae8d74b3 2021-06-22)
release: 1.54.0
commit-hash: 5ae8d74b3b2d58f32c8d357e5cfa04d430a70e0b
commit-date: 2021-06-22

$ rustc --version --verbose
rustc 1.54.0 (a178d0322 2021-07-26)
binary: rustc
commit-hash: a178d0322ce20e33eac124758e837cbd80a6f633
commit-date: 2021-07-26
host: x86_64-unknown-linux-gnu
release: 1.54.0
LLVM version: 12.0.1
@Frago9876543210 Frago9876543210 added the bug Something isn't working label Aug 12, 2021
@Enselic
Copy link
Collaborator

Enselic commented Aug 12, 2021

Fixed via #1761 but it has not been included in a release yet

@Enselic
Copy link
Collaborator

Enselic commented Aug 12, 2021

@sharkdp A small note in case you feel like making a release to get the fix out: I can't code for 4-6 days, but I'm slightly unhappy with our current application, quick-build-application, full-application feature setup.

Main problems are that we can simplify to only need two of those, and that we (read: I) kind of broke backwards compatibility by changing semantics of the old application feature.

It is not the end of the world if we make a release anyway, but I would prefer if we could wait some days (or longer) with making a release to get the git compile fix out. Another option could be to make a hot fix release of 0.18.2 + only the git fix, but that's probably not worth the extra work.

@sharkdp
Copy link
Owner

sharkdp commented Aug 12, 2021

Another option could be to make a hot fix release of 0.18.2 + only the git fix, but that's probably not worth the extra work.

@Frago9876543210 I suppose it's not that urgent? You should be able to cargo-install master.

@Enselic
Copy link
Collaborator

Enselic commented Aug 17, 2021

I'm slightly unhappy with our current application, quick-build-application, full-application feature setup.

This has now been addressed via the merge of #1791

@Enselic Enselic changed the title Can't install bat with rust 1.54 Can't install bat 0.18.2 with rust 1.54 Aug 21, 2021
@Enselic
Copy link
Collaborator

Enselic commented Aug 22, 2021

We made a hotfix release to fix this problem: https://github.com/sharkdp/bat/releases/tag/v0.18.3

The release has been published as a crate: https://crates.io/crates/bat/0.18.3

I have confirmed that cargo install bat works now with Rust 1.54, so I'll close this issue.

@Enselic Enselic closed this as completed Aug 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants