-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
A-diagnosticsArea: Error and warning messages generated by Cargo itself.Area: Error and warning messages generated by Cargo itself.C-bugCategory: bugCategory: bugS-acceptedStatus: Issue or feature is accepted, and has a team member available to help mentor or reviewStatus: Issue or feature is accepted, and has a team member available to help mentor or review
Description
Problem
Cargo emits confusing errors when trying to use example crates
Steps
When you have an example crate, and define it in the main crate's cargo.toml with
[[example]]
name = "example1"
path = "examples/example1"
commands like cargo check --examples gives useless errors like:
error: couldn't read examples/example1: Access is denied. (os error 5)on Windows,error: couldn't read examples/example1: Is a directory (os error 21)on Ubuntu/MacOS
Possible Solution(s)
It would be nice if this would Just Work. But otherwise it would be friendlier to nudge users to something like
[[example]]
name = "example1"
path = "examples/example1/src/main.rs"
rather than emitting useless error messages
Notes
No response
Version
cargo 1.57.0 (b2e52d7ca 2021-10-21)
release: 1.57.0
commit-hash: b2e52d7cab0a286ee9fcc0c17510b1e72fcb53eb
commit-date: 2021-10-21
host: x86_64-pc-windows-msvc
libgit2: 1.3.0 (sys:0.13.23 vendored)
libcurl: 7.79.1-DEV (sys:0.4.49+curl-7.79.1 vendored ssl:Schannel)
os: Windows 10.0.19043 (Windows 10 Home) [64-bit]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Error and warning messages generated by Cargo itself.Area: Error and warning messages generated by Cargo itself.C-bugCategory: bugCategory: bugS-acceptedStatus: Issue or feature is accepted, and has a team member available to help mentor or reviewStatus: Issue or feature is accepted, and has a team member available to help mentor or review