samcrow / canadensis

A Rust implementation of Cyphal
Apache License 2.0
44 stars 5 forks source link

Git path length error on windows #9

Closed chemicstry closed 2 years ago

chemicstry commented 2 years ago

The long filename test breaks git on windows:

error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`

Caused by:
  failed to load source for dependency `canadensis`

Caused by:
  Unable to update https://github.com/samcrow/canadensis#9f6553f6

Caused by:
  path too long: 'C:/Users/chemi/.cargo/git/checkouts/canadensis-38552ae0618cb139/9f6553f/canadensis_dsdl_frontend/tests/compile_fail/long_name/canadensis/long_long/TwoHundredAndFiftySixCharactersLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLong.1.0.uavcan'; class=Filesystem (30)

It seems that git for windows (msys) has a 260 character limit for paths. This can be fixed by git config --system core.longpaths true, but it would be nice if it worked with defaults.

samcrow commented 2 years ago

This change removes the long file name from the repository. I don't have a Windows development environment, so please try that branch and let me know if it fixes the problem.