Closed MaksymZavershynskyi closed 4 years ago
Note, reproducibility of this issue might be difficult, since it might depend on the local cargo cache.
@nearmax I got this same when upgrading dependencies in pow-faucet
. @evgenykuzyakov advised me to delete Cargo.lock
and rebuild, and that worked
Would it work here as well?
Re-export is mostly done. AFAIK, all the issues are resolved, but @evgenykuzyakov is busy finishing the contracts, so he said he would have the bandwidth only the next week (it sounded fine to me). “*” versioning is very conservative and it will indeed try to keep Cargo.lock with minimal changes if possible causing such mismatches.
@frol @nearmax @evgenykuzyakov I'm still not clear on if we actually want this.
“*” versioning is very conservative and it will indeed try to keep Cargo.lock with minimal changes if possible causing such mismatches.
Does this mean we should stop using it? Or is it a normal Rust workflow to delete Cargo.lock
when these sorts of issues are encountered?
@frol @nearmax @evgenykuzyakov I'm still not clear on if we actually want this.
“*” versioning is very conservative and it will indeed try to keep Cargo.lock with minimal changes if possible causing such mismatches.
Does this mean we should stop using it? Or is it a normal Rust workflow to delete
Cargo.lock
when these sorts of issues are encountered?
We have recurrent complains from people copying one of our examples and getting obscure compilation errors as you have observed. This is because of "*
" notation. "*
" notation is not meant to "fix" the dependencies mismatch, and the reason why it was introduced is because we thought it was. So now that we have observed that it does not fix anything and causes obscure compilation errors we need to finish re-export, and finally fix this issue.
we need to finish re-export, and finally fix this issue
Sorry, still not quite understanding, but I think that's because I'm thinking about this from the perspective of other apps, such as any created with create-near-app
Will the "re-exporting" change you're making here in near-sdk-rs
allow other apps to use the *
syntax without issue?
Will the "re-exporting" change you're making here in near-sdk-rs allow other apps to use the * syntax without issue?
It will make "*" unnecessary.
Even better! Thanks for the clarification.
obsolete.
I just tried to compile the contract with the following Cargo.toml:
And received the following error:
Notice that it complains about borsh version being incompatible with whatever version we use in
near-sdk-rs
. It seems like "" notation does not pick the correct compatible version. After I replaced `borsh = ""with
borsh = "0.6.1"` it compiled successfully."*"
from all our examples and stop advising people to use"*"
notation. CC @mikedotexeCC @evgenykuzyakov