Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

Error message is shown, claiming cargo check can give more info; cargo check shows no problems #57

Closed
parasyte opened this issue Feb 20, 2018 · 3 comments

Comments

@parasyte
Copy link

parasyte commented Feb 20, 2018

I get this error message on a private project when I open any *.rs file. The error only started showing up with a recent rust-ide release. When I run cargo check as instructed, it finishes successfully with no other feedback.

screen shot 2018-02-20 at 1 28 20 pm

parasyte@Turkatron:~/projects/endeavium/endeavium-rs (master)$ cargo check
   Compiling byteorder v1.1.0
   Compiling sdl2-sys v0.30.0
   Compiling bitflags v1.0.0
   Compiling cc v1.0.1
   Compiling bitflags v0.7.0
   Compiling libc v0.2.32
   Compiling num-traits v0.1.40
   Compiling serde v1.0.15
   Compiling quote v0.3.15
   Compiling approx v0.1.1
   Compiling lazy_static v0.2.9
   Compiling unicode-xid v0.0.4
   Compiling rand v0.3.17
   Compiling synom v0.11.3
   Compiling num-integer v0.1.35
   Compiling syn v0.11.11
   Compiling miniz-sys v0.1.10
   Compiling num-iter v0.1.34
   Compiling num v0.1.40
   Compiling cgmath v0.15.0
   Compiling serde_derive_internals v0.16.0
   Compiling sdl2 v0.30.0
   Compiling flate2 v0.2.20
   Compiling serde_derive v1.0.15
   Compiling imagefmt v4.0.0
   Compiling odyssium v0.1.0 (file:///Users/parasyte/projects/endeavium/endeavium-rs/odyssium)
   Compiling serde_bytes v0.10.2
   Compiling serde_cbor v0.6.1
   Compiling endeavium v0.1.0 (file:///Users/parasyte/projects/endeavium/endeavium-rs)
    Finished dev [unoptimized + debuginfo] target(s) in 12.0 secs
parasyte@Turkatron:~/projects/endeavium/endeavium-rs (master)$ cd odyssium
parasyte@Turkatron:~/projects/endeavium/endeavium-rs/odyssium (master)$ cargo check
    Updating registry `https://github.com/rust-lang/crates.io-index`
 Downloading bitflags v1.0.1
 Downloading num-traits v0.1.43
 Downloading rand v0.3.22
 Downloading num-traits v0.2.0
 Downloading rand v0.4.2
 Downloading libc v0.2.36
   Compiling num-traits v0.2.0
   Compiling approx v0.1.1
   Compiling libc v0.2.36
   Compiling bitflags v1.0.1
   Compiling rand v0.4.2
   Compiling num-traits v0.1.43
   Compiling rand v0.3.22
   Compiling cgmath v0.15.0
   Compiling odyssium v0.1.0 (file:///Users/parasyte/projects/endeavium/endeavium-rs/odyssium)
    Finished dev [unoptimized + debuginfo] target(s) in 6.48 secs

I do not have a Cargo.toml in the root project directory, but this shouldn't really matter, right?

Here's a screenshot of the Atom dev console with the logging from rust-ide. It doesn't really provide any useful information:

screen shot 2018-02-20 at 1 30 09 pm

@alexheretic
Copy link
Member

You do need a root, or parent, Cargo.toml file otherwise Rls won't work. Only recent versions of Rls have started to actually tell you this, which is why you wouldn't have seen the error before.

You could try adding a very simple one at root:

# Cargo.toml
[workspace]
members = [
    "endeavium-rs",
]

I want to add a better warning here, maybe an additional message to suggest adding a root Cargo.toml. Also probably an ignore for this project button.

@parasyte
Copy link
Author

Yep, adding a root Cargo.toml does solve this problem for me. Cheers for that.

@alexheretic
Copy link
Member

I'll close this as discussion of how to improve the no root/parent Cargo.toml can happen in #49

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