-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Paths printed relative to the Cargo.toml file interfere with M-x compile #209
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
Comments
+10 I use projectile instead of |
Looks like not at issue anymore as compilation warnings/errors now contain full paths. |
Possibly solution: #694 (comment) |
Note that the paths are still relative when compiling a crate at a non-standard location using a [[bin]] entry (and I assume the same goes for [[lib]]). |
All paths printed will now be absolute paths unless the path is a descendant of the current directory. This should keep error messages and warnings of a reasonable length when working with the local project while still allowing errors in registry/git dependencies to be tracked down. Special care is taken in these situations to ensure that the error message from the compiler prints a reasonable path. Closes rust-lang#209 Closes rust-lang#694
All paths printed will now be absolute paths unless the path is a descendant of the current directory. This should keep error messages and warnings of a reasonable length when working with the local project while still allowing errors in registry/git dependencies to be tracked down. Special care is taken in these situations to ensure that the error message from the compiler prints a reasonable path. Closes #209 Closes #694
If you're in a subdirectory of Cargo repository (e.g.
src
) and runcargo build
,rustc
is run from the directory withCargo.toml
, meaning all printed paths are relevative to that directory, not the one wherecargo build
was run.Emac's M-x compile mode will "hyperlink" paths in error messages to allow jumping straight to the error (I'm sure other editors provide this functionality too), but it is taken relative to the folder of the buffer on which
M-x compile
was run (i.e. if you are editing.../src/lib.rs
and runM-x compile cargo build
then emacs assumes the diagnostics are relative to.../src
). Hence, the automatic running ofrustc
in a different directory makes it harder to use that mode.This would theoretically be fixed by running the
rustc
subprocess from the directory in whichcargo
is invoked.The text was updated successfully, but these errors were encountered: