Unable to update from AUR repo
WANDEX opened this issue · 7 comments
Thought it might seem important to you.
distro: arch linux,
aur-helper: yay
Package Details: page-git v2.3.4-1
# current local version
$ page -V
page 2.1.0
I got the following error trying to upgrade from AUR:
Compiling page v2.3.4 (/home/wndx/.cache/yay/page-git/src/page)
error[E0599]: no method named `as_deref` found for type `std::option::Option<std::string::String>` in the current scope
--> src/page.rs:17:26
|
17 | let level = rust_log.as_deref().unwrap_or("warn");
| ^^^^^^^^ help: did you mean: `as_ref`
error[E0599]: no method named `as_deref` found for type `std::option::Option<std::string::String>` in the current scope
--> src/page.rs:135:70
|
135 | let cmd_provided_by_user = &nvim_ctx.opt.command.as_deref().unwrap_or_default();
| ^^^^^^^^ help: did you mean: `as_ref`
error[E0599]: no method named `as_deref` found for type `std::option::Option<std::string::String>` in the current scope
--> src/page.rs:171:61
|
171 | let cmd_provided_by_user = nvim_ctx.opt.command.as_deref().unwrap_or_default();
| ^^^^^^^^ help: did you mean: `as_ref`
error[E0277]: the size for values of type `str` cannot be known at compilation time
--> src/page.rs:171:17
|
171 | let cmd_provided_by_user = nvim_ctx.opt.command.as_deref().unwrap_or_default();
| ^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `std::marker::Sized` is not implemented for `str`
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
= note: all local variables must have a statically known size
= help: unsized locals are gated as an unstable feature
error[E0599]: no method named `as_deref` found for type `std::option::Option<std::string::String>` in the current scope
--> src/neovim.rs:446:93
|
446 | let (nvim_session, nvim_proc) = if let Some(nvim_listen_addr) = cli_ctx.opt.address.as_deref() {
| ^^^^^^^^ help: did you mean: `as_ref`
error: aborting due to 5 previous errors
Some errors occurred: E0277, E0599.
For more information about an error, try `rustc --explain E0277`.
error: Could not compile `page`.
To learn more, run the command again with --verbose.
==> ERROR: A failure occurred in package().
Aborting...
Error making: page-git
Would you mind to fix this pls? ❤️
You have outdated rust version: as_deref()
was introduced only in 1.40.
Could you upgrade it and try to install page again?
Current upstream arch pacman version of rustup is 1.21.1-4
and output of:
$ rustc -V
rustc 1.34.2 (6c2484dc3 2019-05-13)
According to arch wiki page of rust
# will not work for pacman version
rustup self update
I will try to remove 'rustup'. And install the pacman -S 'rust'.
Because rust and rustup are in conflict.
And then I’ll report the results.
This solved the Issue. I think that 'rust' should be added as a required dependency for page-git AUR package, or at least following line should be added to README.
# allow to resolve conflict if rustup
pacman -S rust
Also i confirm that this error is vanished
here-document at line 0 delimited by end-of-file" warning in bash
Thank You Very Much for that fix! 🎉
If everything is cleared up, you can close the issue, thank you once again, an excellent software btw. ❤️
I think that 'rust' should be added as a required dependency for page-git AUR package
It wouldn't make any difference, since rustup
also provides rust
meta-package
or at least following line should be added to README
Once rust-lang/rust#65262 will be implemented I'll add "minimum supported rust" version to Cargo.toml as well as badge with it into README.
Currently, the best I could made is to add if rustc < 1.40 then echo ERROR
to PKGBUILD, so users will know exactly why their build is failing and what to do in order to fix it. That probably will be added with the next release of page, and up to that I will keep this issue open.
thank you once again, an excellent software btv.
Thank you as well, since by fixing issue reports I made it better :)
Ok, I've pushed rustc version check to AUR, so helpful error message will be issued for rustc < 40.
Also, it seems that you've missed this one: updating rustup via pacman doesn't update installed toolchains, so like in your case it's possible to have recent rustup and extremely outdated rustc, cargo, anything you've previously installed by rustup.
You need to manually update them by running rustup update
.
And not by rustup self update
because this is to update rustup by itself; installed by pacman
it will simply not have enough permissions to upgrade - this exactly what Arch wiki wanted to say.
I can't seem to install it either. I'm not familiar with the rust ecosystem but I ran 'rustup default nightly' which I believe brings me the latest version of all the tools I need and compiling brings me errors.
- You can help author to understand your problem by adding logs of the errors you encountered.
- List the steps of your actions.
- Pasting output of the commands - may also be useful information:
whereis rustup
whereis rustc
-V, --version info of the tools
everything else what might be useful
- Without seeing the errors that you receive, the maintainer will not be able to help you, the reason can be literally anything, including user permissions, outdated or non-existent dependencies, anything!
Cheers.