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

cargo install fails on beta but cargo build works #102

Closed
TheZoq2 opened this issue Oct 11, 2019 · 2 comments
Closed

cargo install fails on beta but cargo build works #102

TheZoq2 opened this issue Oct 11, 2019 · 2 comments

Comments

@TheZoq2
Copy link

TheZoq2 commented Oct 11, 2019

I'm trying to install this project from source by using cargo install --path . which gives me the following error:

error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
  --> src/tex.rs:54:5
   |
54 | /     Command::new(format.executable())
55 | |         .args(&["--interaction=batchmode", "-shell-escape", file_name])
56 | |         .current_dir(&directory)
57 | |         .stdout(Stdio::null())
58 | |         .stderr(Stdio::null())
59 | |         .status()
60 | |         .map_err(|_| CompileError::LatexNotInstalled)?
   | |______________________________________________________^ the `?` operator cannot be applied to type `futures_util::try_future::map_err::MapErr<impl core::future::future::Future, [closure@src/tex.rs:60:18: 60:53]>`
   |
   = help: the trait `std::ops::Try` is not implemented for `futures_util::try_future::map_err::MapErr<impl core::future::future::Future, [closure@src/tex.rs:60:18: 60:53]>`
   = note: required by `std::ops::Try::into_result

This happens with a freshly installed beta (rustup update beta), nightly-2019-10-04 and the nightly version specified in the CI files here.

However, cargo build --release seems to work, which is a bit weird since I was under the impression that install just runs cargo build --release.

I tried both the current master, and the 1.6.0 tag

@efoerster
Copy link
Member

I think the issue was caused by the fact that cargo install ignores the lockfile, see rust-lang/cargo#6983. You should use the --locked flag. However, this particular error should be fixed now by 2d5bdff.

@TheZoq2
Copy link
Author

TheZoq2 commented Oct 11, 2019

Oh, that's not the behaviour I would expect :P

It does look like 2d5bdff fixed it though, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants