-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use cargo-metadata command to learn about workspace root #55
Conversation
Great, at now with |
After some further testing looks there is issue with this PR. For example consider such structure:
before this PR, I can run But at now I can not run |
There is a much simpler example. See attachment. So before that PR and rustc 1.24 you can do some refactoring inside one crate, |
So, it seems to me that we should be aware of two directories here:
I believe you can get the directories using the following functions:
Next, we should run I believe Line 227 in ba652e4
But where's the dir for error links? |
FWIW, the correct way to handle compiling a crate would be to look at |
I belive default directory (cwd of compilation command) is root directory for errors links. |
Hm, interesting! I think one possible solution here is always launch cargo inside |
This change is based on kwrooijen#55 It uses cargo-process--custom-path-to-bin instead of hard coded "cargo", plus it uses --manifest-path to run "cargo" against only one crate.
This should be fixed with #56 |
Hi! recently Cargo changed the way it reports errors (they are now realative to the workspace root), and this commits fixes cargo.el to support it.
The idea is to ask Cargo itself about where's the workspace root, and fallback to old
Cargo.toml
discovery, if that fails.