Skip to content
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

Line numbers in Cargo.toml related error messages please #9687

Closed
gilescope opened this issue Jul 14, 2021 · 3 comments
Closed

Line numbers in Cargo.toml related error messages please #9687

gilescope opened this issue Jul 14, 2021 · 3 comments
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

Comments

@gilescope
Copy link
Contributor

As rust projects grow it becomes more important to have excellent error messages.

Part of that is being able to pinpoint the source span of an issue in a particular Cargo.toml (in the same way that rustc does). This enables IDEs to be able to go directly to the source line in question.

When we're dealing with one crate at a time this is less of an issue, but if you're dealing with 100 crates then line numbers really help speed up getting to the location of the error so that it can be quickly fixed.

(Apoligies if this is a dupe, I did look but surprisingly couldn't find a similar issue)

@gilescope gilescope added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Jul 14, 2021
@gilescope
Copy link
Contributor Author

I see we can use toml::Spanned for fields in the TomlManifest that we're interested in giving detailed line number information about - I'd suggest we start with just dev/build/dependencies having associated line numbers and see where we go from there.

@ehuss
Copy link
Contributor

ehuss commented Jul 14, 2021

There are similar issues such as #7548 and #6144. It would be nice, but quite a large change.

@ehuss
Copy link
Contributor

ehuss commented Aug 3, 2021

I'm going to close as a duplicate of the above linked issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Projects
None yet
Development

No branches or pull requests

2 participants