You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On my 64 bit Arch Linux machine I tried to use cargo to install exa, and got the following error:
$ cargo install --git https://github.com/ogham/exa
Updating git repository `https://github.com/ogham/exa`
Compiling exa v0.4.0 (https://github.com/ogham/exa#9b87ef1d)
.multirust/toolchains/stable/cargo/git/checkouts/exa-243d74bb3bec7b92/master/src/file.rs:226:29: 226:51 error: mismatched types:
expected `i64`,
found `u64` [E0308]
.multirust/toolchains/stable/cargo/git/checkouts/exa-243d74bb3bec7b92/master/src/file.rs:226 f::Blocks::Some(self.metadata.blocks())
^~~~~~~~~~~~~~~~~~~~~~
.multirust/toolchains/stable/cargo/git/checkouts/exa-243d74bb3bec7b92/master/src/file.rs:226:29: 226:51 help: run `rustc --explain E0308` to see a detailed explanation
error: aborting due to previous error
failed to compile `exa v0.4.0 (https://github.com/ogham/exa#9b87ef1d)`, intermediate artifacts can be found at `/home/kecors/target-install`
Caused by:
Could not compile `exa`.
To learn more, run the command again with --verbose.
The release notes for 1.8.0 indicate that MetadataExt was changed and no longer returns platform specific types. In particular:
impl MetadataExt for Metadata1.1.0
...
fn blocks(&self) -> u64
Here is the code in exa at the point of the error (in file.rs):
/// This file's number of filesystem blocks.
///
/// (Not the size of each block, which we don't actually report on)
pub fn blocks(&self) -> f::Blocks {
if self.is_file() || self.is_link() {
f::Blocks::Some(self.metadata.blocks())
}
else {
f::Blocks::None
}
}
f::Blocks is defined as follows:
pub mod fields {
use libc::{blkcnt_t, gid_t, ino_t, nlink_t, time_t, uid_t};
...
pub enum Blocks {
Some(blkcnt_t),
None,
}
Currently in exa, the Blocks enum is used only for display. It appears that this problem could be resolved by changing the Blocks enum to use u64 rather than blkcnt_t from libc.
The text was updated successfully, but these errors were encountered:
I changed the type definitions so they're specific ones now, which should match the ones that get returned from the methods on Metadata. Your notes really helped!
On my 64 bit Arch Linux machine I tried to use cargo to install exa, and got the following error:
The release notes for 1.8.0 indicate that MetadataExt was changed and no longer returns platform specific types. In particular:
Here is the code in exa at the point of the error (in file.rs):
f::Blocks is defined as follows:
Currently in exa, the Blocks enum is used only for display. It appears that this problem could be resolved by changing the Blocks enum to use u64 rather than blkcnt_t from libc.
The text was updated successfully, but these errors were encountered: