Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

rls could not compile clap #1454

Closed
mooreryan opened this issue May 5, 2019 · 3 comments
Closed

rls could not compile clap #1454

mooreryan opened this issue May 5, 2019 · 3 comments

Comments

@mooreryan
Copy link

rls in Visual Studio Code is unable to compile clap. Here is some info on the problem. Let me know if there is any other info that might help!

Reproducing error

Make a project.

cargo new snazzy_proj

Add clap to Cargo.toml

[dependencies]
clap = "2.33"

Then rls does its thing and gives this error message:

Could not compile `clap`.
process didn't exit successfully: `/Users/moorer/.rustup/toolchains/stable-x86_64-apple-darwin/bin/rls \
  --crate-name clap /Users/moorer/.cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/clap-2.33.0/src/lib.rs \
  --color never \
  --crate-type lib \
  --emit=dep-info,metadata -C debuginfo=2 \
  --cfg 'feature="ansi_term"' \
  --cfg 'feature="atty"' \
  --cfg 'feature="color"' \
  --cfg 'feature="default"' \
  --cfg 'feature="strsim"' \
  --cfg 'feature="suggestions"' \
  --cfg 'feature="vec_map"' -C metadata=0f3374c7b6aa02b9 -C extra-filename=-0f3374c7b6aa02b9 \
  --out-dir /Users/moorer/projects/rust/snazzy_proj/target/rls/debug/deps -L dependency=/Users/moorer/projects/rust/snazzy_proj/target/rls/debug/deps \
  --extern ansi_term=/Users/moorer/projects/rust/snazzy_proj/target/rls/debug/deps/libansi_term-f8f6c2c1e8d4bc7f.rmeta \
  --extern atty=/Users/moorer/projects/rust/snazzy_proj/target/rls/debug/deps/libatty-06f77584aad7beb9.rmeta \
  --extern bitflags=/Users/moorer/projects/rust/snazzy_proj/target/rls/debug/deps/libbitflags-34e85485b1ddcbd8.rmeta \
  --extern strsim=/Users/moorer/projects/rust/snazzy_proj/target/rls/debug/deps/libstrsim-e60bf08da7862270.rmeta \
  --extern textwrap=/Users/moorer/projects/rust/snazzy_proj/target/rls/debug/deps/libtextwrap-0c15bc2f46df53fb.rmeta \
  --extern unicode_width=/Users/moorer/projects/rust/snazzy_proj/target/rls/debug/deps/libunicode_width-c46f7e2bca50b6eb.rmeta \
  --extern vec_map=/Users/moorer/projects/rust/snazzy_proj/target/rls/debug/deps/libvec_map-493cbb5fb0ddd356.rmeta \
  --cap-lints allow \
  --error-format=json \
  --sysroot /Users/moorer/.rustup/toolchains/stable-x86_64-apple-darwin` (exit code: 101)

Note that building the program with cargo run works fine.

Versions

I updated everything to be sure it wasn't a problem there. Here are the versions of everything....

Visual Studio Code: Version 1.33.1 (1.33.1) -- 51b0b28134d51361cf996d2f0a1c698247aeabd8

I ran rustup update just to be sure that wasn't the problem.

stable-x86_64-apple-darwin updated - rustc 1.34.1 (fc50f328b 2019-04-24)
nightly-x86_64-apple-darwin updated - rustc 1.36.0-nightly (8dd4aae9a 2019-05-04)

Also, updated the Visual Studio Code rls plugin to the latest version (v0.6.1).

@alexheretic
Copy link
Member

Sounds like the bitflags 1.0.5 issue see #1449 (comment)

@mooreryan
Copy link
Author

You're right, as a workaround locking bitflags to 1.0.4 as in bitflags/bitflags#177 fixes things.

@alexheretic
Copy link
Member

With 1.0.5 yanked discussing the bug in rls can be done in #1449 so I'll close this

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

No branches or pull requests

2 participants