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]
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
commands like
cargo check --examplesgives 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/MacOSPossible Solution(s)
It would be nice if this would Just Work. But otherwise it would be friendlier to nudge users to something like
rather than emitting useless error messages
Notes
No response
Version