Git fails cargo build checksum after cargo vendor

I have vendor:ed my dependencies with cargo vendor --versioned-dirs dep/ext and tested my changes locally both online and offline.

However, when I push my change to git (I submit the Cargo.lock-file as well), the build fails with a checksum error.

error: the listed checksum of 'libproject\dep\ext\async-stream-0.3.5\README.tpl' has changed:
It seems to happen with any file because running it several times gives same error but normally a different file.

Throwing away the vendor directory and re-doing it makes it work (but git recognizes no differences)

I'm no git-master but I had a hunch that git's newline could have messed something up but I think I tried most settings with no luck.

Any ideas?

Turns out it was the line endings that tripped us over. We solved this by adding new/more rules to gitattribues and keep line endings to lf (* text eol=lf). Strangely enough one package didn't want to follow that rule so we added an exception for that.

# Special exception so that cargo doesn't complain
int128.rs text eol=crlf

Having this issue makes me wonder if it would make sense so have the checksum ignore line endings...

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.