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

Show a warning: root folder must contain cargo.toml #49

Closed
Dowwie opened this issue Jan 27, 2018 · 7 comments
Closed

Show a warning: root folder must contain cargo.toml #49

Dowwie opened this issue Jan 27, 2018 · 7 comments
Labels

Comments

@Dowwie
Copy link

Dowwie commented Jan 27, 2018

FYI-- unless the root project folder added to Atom contains the Cargo.toml, the RLS won't work.

I didn't have any warnings about this requirement in Atom, but did in VSCode.

@Dowwie Dowwie changed the title Many features not working root folder must contain cargo.toml Jan 27, 2018
@alexheretic
Copy link
Member

That's right, I've added a note to the readme that mentions this.

Perhaps we could add a warning with some advice. Is that what you're suggesting?

@Dowwie
Copy link
Author

Dowwie commented Jan 27, 2018 via email

@alexheretic
Copy link
Member

I agree, I just had a quick look and we start Rls in this case but it just doesn't work. When I get some time I'll figure out if this logic can be in Rls itself (to send an error message to clients). But perhaps a short term fix could be shoved into this package anyway.

@alexheretic alexheretic changed the title root folder must contain cargo.toml Show a waning: root folder must contain cargo.toml Jan 27, 2018
@alexheretic alexheretic changed the title Show a waning: root folder must contain cargo.toml Show a warning: root folder must contain cargo.toml Jan 29, 2018
@alexheretic
Copy link
Member

I've proposed to fix this in Rls: rust-lang/rls#687

@alexheretic
Copy link
Member

Rls now sends build failure notifications
screenshot from 2018-02-19 00-04-50

It still isn't obvious that you should add a root Cargo.toml. Perhaps we should add a hint client side?

@alexheretic
Copy link
Member

alexheretic commented Feb 26, 2018

If we can resolve rust-lang/rls#723 so that ide-rust can listen to build-finished (fail/success) I'll be able to fairly easily add functionality including: On failure; scanning for Cargo.toml in parent dirs and showing a hint to add one if not found.

@alexheretic
Copy link
Member

With rust-lang/rls#657 (ie in the next Rls release) the Rls error message has improved.

This is now good enough to point people in the right direction. Maybe in future we could add a button to auto generate an appropriate Cargo.toml. For now I think this satisfies the issue so I'll close.

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

No branches or pull requests

2 participants