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

[Project Model] Error when loading a Cargo.toml with edition #1043

Closed
kngwyu opened this issue Sep 6, 2018 · 5 comments
Closed

[Project Model] Error when loading a Cargo.toml with edition #1043

kngwyu opened this issue Sep 6, 2018 · 5 comments

Comments

@kngwyu
Copy link
Contributor

kngwyu commented Sep 6, 2018

When the Cargo.toml in workspace-root contains edition, ProjectModelProvider causes an error
like

ERROR 2018-09-06T05:58:45Z: rls::actions: failed to fetch project model, using fallback: failed to parse manifest at `/home/yu/Programs/lark/Cargo.toml`
ErrorMessage { msg: "the cargo feature `edition` requires a nightly version of Cargo, but this is the `dev` channel" }

and can't do completion for external crates.
According to @matklad , it's related to https://github.com/rust-lang/cargo/blob/b15ee255e5cf625f15ff3f5ecdc6efb76e402768/src/cargo/lib.rs#L231

@Xanewok
Copy link
Member

Xanewok commented Sep 6, 2018

As @dwijnand pointed out, the edition should be stabilised soon: rust-lang/cargo#5984

However, I'm puzzled by the cargo feature `edition` requires a nightly version of Cargo, but this is the `dev` channel. Shouldn't dev channel be an 'all bets are off' thing and if that's a manually built bleeding edge Cargo, then nightly features should obviously be permitted? I know Rustfmt does this.

@dwijnand
Copy link
Member

dwijnand commented Sep 6, 2018

Good link! Turns out that change in Rustfmt is very recent: https://github.com/rust-lang-nursery/rustfmt/pull/2948/files

So perhaps RLS just needs the same change?

bors-voyager bot added a commit that referenced this issue Sep 10, 2018
1045: Enable nightly flag for cargo r=Xanewok a=kngwyu

For #1043 
But I want to note here that racer has not yet implemented 2018 style path features completely(e.g. see racer-rust/racer#916).
So to make all things work we have to do additional works on racer side.

Co-authored-by: kngwyu <yuji.kngw.80s.revive@gmail.com>
bors-voyager bot added a commit that referenced this issue Sep 11, 2018
1045: Enable nightly flag for cargo r=Xanewok a=kngwyu

For #1043 
But I want to note here that racer has not yet implemented 2018 style path features completely(e.g. see racer-rust/racer#916).
So to make all things work we have to do additional works on racer side.

Co-authored-by: kngwyu <yuji.kngw.80s.revive@gmail.com>
bors-voyager bot added a commit that referenced this issue Sep 17, 2018
1045: Enable nightly flag for cargo r=Xanewok a=kngwyu

For #1043 
But I want to note here that racer has not yet implemented 2018 style path features completely(e.g. see racer-rust/racer#916).
So to make all things work we have to do additional works on racer side.

Co-authored-by: kngwyu <yuji.kngw.80s.revive@gmail.com>
@Xanewok
Copy link
Member

Xanewok commented Nov 30, 2018

@kngwyu can we close this? The edition is stable now and shouldn't pose any more problems.

@kngwyu
Copy link
Contributor Author

kngwyu commented Nov 30, 2018

Yeah, I just forgot to close this

@kngwyu kngwyu closed this as completed Nov 30, 2018
@dwijnand
Copy link
Member

Thanks!

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

3 participants