Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upUse cargo-metadata command to learn about workspace root #55
Conversation
matklad
referenced this pull request
Feb 13, 2018
Closed
Add a compiler option for a 'pseudo-cwd' for rustc errors #47939
This comment has been minimized.
This comment has been minimized.
|
Great, at now with |
matklad
referenced this pull request
Feb 13, 2018
Closed
warning/errors reporting breaks at nightly #4998
This comment has been minimized.
This comment has been minimized.
|
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 |
This comment has been minimized.
This comment has been minimized.
davemilter
commented
Feb 13, 2018
|
There is a much simpler example. See attachment. So before that PR and rustc 1.24 you can do some refactoring inside one crate, |
This comment has been minimized.
This comment has been minimized.
|
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? |
This comment has been minimized.
This comment has been minimized.
|
FWIW, the correct way to handle compiling a crate would be to look at |
This comment has been minimized.
This comment has been minimized.
I belive default directory (cwd of compilation command) is root directory for errors links. |
This comment has been minimized.
This comment has been minimized.
|
Hm, interesting! I think one possible solution here is always launch cargo inside |
Dushistov
added a commit
to Dushistov/cargo.el
that referenced
this pull request
Feb 22, 2018
Dushistov
referenced this pull request
Feb 22, 2018
Merged
Fix references to source code in compilation buffer for rustc 1.24 #56
This comment has been minimized.
This comment has been minimized.
|
This should be fixed with #56 |
matklad commentedFeb 13, 2018
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.tomldiscovery, if that fails.