There's something weird going on with cargo and proc-macro2


#1

I’m trying to publish a new version of my crate after upgrading a couple dependencies(proc-macro2 v0.2.3) that were broken by the latest nightly compiler.

After upgrading the dependencies, i run cargo build it compiles the version(proc-macro2 v0.3) of the dependencies i specified, no errors.

feeling very satisfied with myself, i decide to run cargo package. But for some reason it’s still compiling proc-macro2 v0.2.3 and failing. This confused me for a while, so i installed cargo-tree so i could inspect my dependency tree.

proc-macro v0.2.3 doesn’t exist anywhere in my dependency tree, so where is cargo package getting it from?


#2

What happens if you delete your Cargo.lock? I believe that cargo package ignores it and does a fresh build; I bet that’s the issue.


#3

thanks but someone already figured it out here https://github.com/SeunLanLege/arc-reactor/issues/46