Stream: t-compiler/wg-rls-2.0

Topic: compiler error on stable


Jane Lusby (Aug 20 2019 at 16:17, on Zulip):

I'm not sure if rust analyzer is supposed to be nightly only, didn't see any mention of that. But trying to update this morning I hit this.

Jane Lusby (Aug 20 2019 at 16:17, on Zulip):
―― 09:15:23 - rust analyzer ――――――――――――――――――――――――――――――――――――――――――――――――――――
    Finished dev [unoptimized + debuginfo] target(s) in 0.38s
     Running `target/debug/ra_tools install-ra`

will run: cargo install --path crates/ra_lsp_server --force
  Installing ra_lsp_server v0.1.0 (/home/jlusby/git/rust/rust-analyzer/crates/ra_lsp_server)
    Updating crates.io index
    Updating git repository `https://github.com/rust-lang/chalk.git`
  Downloaded ra_rustc_lexer v0.1.0-pre.3
  Downloaded ra_vfs v0.2.7
   Compiling autocfg v0.1.6
   Compiling ra_rustc_lexer v0.1.0-pre.3
   Compiling ra_vfs v0.2.7
error[E0554]: #![feature] may not be used on the stable release channel
 --> /home/jlusby/.cargo/registry/src/github.com-1ecc6299db9ec823/ra_rustc_lexer-0.1.0-pre.3/src/lib.rs:3:43
  |
3 | #![cfg_attr(not(feature = "unicode-xid"), feature(unicode_internals))]
  |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: ignoring -C extra-filename flag due to -o flag

error: aborting due to previous error

For more information about this error, try `rustc --explain E0554`.
error: Could not compile `ra_rustc_lexer`.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `ra_lsp_server v0.1.0 (/home/jlusby/git/rust/rust-analyzer/crates/ra_lsp_server)`, intermediate artifacts can be found at `/home/jlusby/git/rust/rust-analyzer/target`

Caused by:
  build failed
Error: "`cargo install --path crates/ra_lsp_server --force` exited with exit code: 101"
matklad (Aug 20 2019 at 16:18, on Zulip):

heh, I've published ra_rustc_lexer v0.1.0-pre.3 about a minute ago :-)

Jane Lusby (Aug 20 2019 at 16:19, on Zulip):

lol, blame topgrade for keeping me on the bleeding edge :P

matklad (Aug 20 2019 at 16:19, on Zulip):

not sure why it is picked up by you though: the lockfile should be on -pre.2 still...

matklad (Aug 20 2019 at 16:20, on Zulip):

Could you check if Cargo.lock is not modfied and contains -pre.2?

Jane Lusby (Aug 20 2019 at 16:20, on Zulip):

sure

Jane Lusby (Aug 20 2019 at 16:20, on Zulip):
master $ rg pre Cargo.lock
592: "number_prefix 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
874:name = "number_prefix"
1259:version = "0.1.0-pre.2"
1271: "ra_rustc_lexer 0.1.0-pre.2 (registry+https://github.com/rust-lang/crates.io-index)",
2115:"checksum number_prefix 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "dbf9993e59c894e3c08aa1c2712914e9e6bf1fcbfc6bef283e2183df345a4fee"
2137:"checksum ra_rustc_lexer 0.1.0-pre.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6baccda91574dfadd7f8a0bc8f9f110f874b6b484289b2536d3dbf4f0d5d97bb"
matklad (Aug 20 2019 at 16:21, on Zulip):

Hm, could it be the case that cargo install --path crates/ra_lsp_server --force ignores the lockfiles?

Jane Lusby (Aug 20 2019 at 16:22, on Zulip):

I've never touched the lockfile code in cargo so I don't know

Jane Lusby (Aug 20 2019 at 16:22, on Zulip):

i would be pretty surprised though

Jane Lusby (Aug 20 2019 at 16:22, on Zulip):

I figured its only supposed to run if you change the toml

Jane Lusby (Aug 20 2019 at 16:22, on Zulip):

i mean

Jane Lusby (Aug 20 2019 at 16:23, on Zulip):

its only supposed to ignore the lockfile when you change the cargo.toml8

Jane Lusby (Aug 20 2019 at 16:23, on Zulip):

*

Jane Lusby (Aug 20 2019 at 16:23, on Zulip):

but then it updates the lockfile as a result of the build usually right?

Jane Lusby (Aug 20 2019 at 16:23, on Zulip):

my lockfile doesnt have unstaged changes as a result of this build

Jane Lusby (Aug 20 2019 at 16:24, on Zulip):

If you really want to get to the bottom of this I'd say ping the cargo people on discord

matklad (Aug 20 2019 at 16:25, on Zulip):

Heh, I am a Cargo person unfortunately: https://github.com/rust-lang/cargo/graphs/contributors :D

matklad (Aug 20 2019 at 16:25, on Zulip):

cargo install --path crates/ra_lsp_server --force --locked should work (notice the --locked)

Jane Lusby (Aug 20 2019 at 16:25, on Zulip):

same, but im just starting :)

Jane Lusby (Aug 20 2019 at 16:26, on Zulip):

#13 on the list tho

Jane Lusby (Aug 20 2019 at 16:26, on Zulip):

movin' on up

matklad (Aug 20 2019 at 16:26, on Zulip):

And I think this might be the issue:

    Updating crates.io index
warning: package `getrandom v0.1.9` in Cargo.lock is yanked in registry `crates.io`, consider running without --locked
Jane Lusby (Aug 20 2019 at 16:27, on Zulip):

is that from your local run? I didn't see that yanked package message when I built it

matklad (Aug 20 2019 at 16:28, on Zulip):

I see it when I explicitelly pass --locked

matklad (Aug 20 2019 at 16:29, on Zulip):

https://github.com/rust-analyzer/rust-analyzer/pull/1707 adds --locked to our installation procedure. Thanks for catching this @Jane Lusby !

Jane Lusby (Aug 20 2019 at 16:35, on Zulip):

ahaa, no problem and my pleasure!

Jane Lusby (Aug 20 2019 at 16:36, on Zulip):

today i learned about --locked so it was a very productive bug report :)

Jane Lusby (Aug 20 2019 at 16:38, on Zulip):

lmk if / when you push a fix so I can try updating again

matklad (Aug 20 2019 at 16:41, on Zulip):

@Jane Lusby that PR is merged, you can try updating again!

Jane Lusby (Aug 20 2019 at 16:50, on Zulip):

@matklad worked like a charm :tada:

Last update: Nov 19 2019 at 18:40UTC