dtolnay / proc-macro-workshop

Learn to write Rust procedural macros  [Rust Latam conference, Montevideo Uruguay, March 2019]
Apache License 2.0
4k stars 1.01k forks source link

error: failed to download `lazy_static v1.4.0` #24

Closed dfinke closed 4 years ago

dfinke commented 4 years ago

Running Windows 10

image

dtolnay commented 4 years ago

Weird error -- the lazy_static 1.4.0 on crates.io definitely does not have a \0 byte on line 1 in Cargo.toml. Could you open up C:\Users\Douglas\.cargo\registry\src\github.com-1ecc6299db9ec823\lazy_static-1.4.0\Cargo.toml and confirm that it looks reasonable? Maybe something got corrupted in your cargo registry cache. Try deleting all of C:\Users\Douglas\.cargo\registry\src\github.com-1ecc6299db9ec823 and then trying cargo test again.

dfinke commented 4 years ago

Weird, the toml file was binary. Thanks for the confirmation on deleting the registry, done. More strangeness: error: failed to download serde v1.0.99

Removed the registry and tried again, same error.

image

dtolnay commented 4 years ago

Something is wacky with your connection to crates.io that is resulting in receiving wrong data. I have seen something like this once before when an employer was MITM'ing https connections and mucking with the contents.

I am closing the issue because I don't think I will be able to debug this with you here, as it doesn't seem to be related to proc macros or this workshop. You could try asking in the Rust subreddit or discord for help debugging this.

dfinke commented 4 years ago

Deleted my rust install, redid it, all good. Thanks for the responses and clues.