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

No such file bug on rust-lang/rust #77

Closed
pickfire opened this issue Jul 24, 2020 · 5 comments
Closed

No such file bug on rust-lang/rust #77

pickfire opened this issue Jul 24, 2020 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@pickfire
Copy link

Describe the bug

It errors but the error should be incorrect.

To Reproduce
Steps to reproduce the behaviour:

  1. git clone https://github.com/rust-lang/rust
  2. cd rust
  3. cargo spellcheck
  4. Error: Failed to parse manifest file /home/ivan/src/pickfire/rs/rust/src/bootstrap/Cargo.toml: No such file or directory (os error 2)
  5. File actually does exists, ls does show the file. Content:
[package]
authors = ["The Rust Project Developers"]
name = "bootstrap"
version = "0.0.0"
edition = "2018"

[lib]
name = "bootstrap"
path = "lib.rs"
doctest = false

[[bin]]
name = "bootstrap"
path = "bin/main.rs"
test = false

[[bin]]
name = "rustc"
path = "bin/rustc.rs"
test = false

[[bin]]
name = "rustdoc"
path = "bin/rustdoc.rs"
test = false

[[bin]]
name = "sccache-plus-cl"
path = "bin/sccache-plus-cl.rs"
test = false

[[bin]]
name = "llvm-config-wrapper"
path = "bin/llvm-config-wrapper.rs"
test = false

[dependencies]
build_helper = { path = "../build_helper" }
cmake = "0.1.38"
filetime = "0.2"
num_cpus = "1.0"
getopts = "0.2.19"
cc = "1.0.35"
libc = "0.2"
serde = { version = "1.0.8", features = ["derive"] }
serde_json = "1.0.2"
toml = "0.5"
lazy_static = "1.3.0"
time = "0.1"
ignore = "0.4.10"
opener = "0.4"

[target.'cfg(windows)'.dependencies.winapi]
version = "0.3"
features = ["fileapi", "ioapiset", "jobapi2", "handleapi", "winioctl"]

[dev-dependencies]
pretty_assertions = "0.6"

It is quite long but it also does not work for other directories as well.

Expected behavior

I don't know, it should check something.

Screenshots

> cargo spellcheck
Error: Failed to parse manifest file /home/ivan/src/pickfire/rs/rust/src/bootstrap/Cargo.toml: No such file or directory (os error 2)

Pplease complete the following information:

  • System: Arch Linux - Linux arch 5.7.10-zen1-1-zen Suggestion underline hats are off by a few characters #1 ZEN SMP PREEMPT Wed, 22 Jul 2020 20:13:40 +0000 x86_64 GNU/Linux
  • Obtained: cargo install --git https://github.com/drahnr/cargo-spellcheck cargo-spellcheck
  • Version: 0.3.0-alpha.6

Additional context

Reference rust-lang/rust#74697 (comment)

@pickfire pickfire added the bug Something isn't working label Jul 24, 2020
@drahnr
Copy link
Owner

drahnr commented Jul 24, 2020

The error message is misleading that cargo_toml yields, after reading first to a str it becomes more obvious:

[2020-07-24T15:20:25Z TRACE cargo_spellcheck::traverse] Handling manifest member src/tools/rust-installer -> /media/supersonic1t/projects/rust/src/tools/rust-installer
[src/traverse/mod.rs:148] &manifest_file = "/snip/projects/rust/src/tools/rust-installer/Cargo.toml"
Error: No such file or directory (os error 2)
Cargo.toml
19:  "src/tools/rust-installer",

is actually not containing a Cargo.toml

I guess it's better to just warn the user about this and continue rather then aborting.

@drahnr
Copy link
Owner

drahnr commented Jul 25, 2020

PR #76 covers changes needed for this, but running it on the rust codebase also uncovered a few more issues which will be addressed in the same PR

@drahnr
Copy link
Owner

drahnr commented Jul 27, 2020

Please give 0.3.0-beta.1 a shot & feel free to re-open if this particular issue persists.

@drahnr drahnr closed this as completed Jul 27, 2020
@pickfire
Copy link
Author

Looks like it works in one of my crate based on standard library liballoc. But there is an issue in rust-lang/rust:

> cargo spellcheck
thread 'main' panicked at 'byte index 40 is not a char boundary; it is inside '♫' (bytes 38..41) of `///         println!("♫ Still alive ♫");`', /home/ivan/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/str/mod.rs:1920:47
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@drahnr
Copy link
Owner

drahnr commented Jul 28, 2020

Could you open a new issue with backtrack?

Funny enough, I tested it yesterday on last week's rust codebase which seemed fine (no further steps done, just git clone)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants