-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
Description
On my project wayland-client, I have a structure like this:
- protocols/
- wayland-client/
|- protocols/ (symlink -> ../protocols)
|- src/
|- Cargo.toml
With previous versions of cargo, publishing wayland-client worked as expected, packaging the contents of protocols
through the symlink as if it was a simple directory.
Now, since I updated to cargo 0.10.0, cargo publish
chokes on the protocols
symlink:
$ cargo publish --verbose
Updating registry `https://github.com/rust-lang/crates.io-index`
Packaging wayland-client v0.6.0 (file:///home/levans/dev/wayland-rs/wayland-client)
Archiving Cargo.toml
Archiving build.rs
Archiving examples/list_globals.rs
Archiving examples/simple_window.rs
Archiving protocols
error: failed to prepare local package for uploading
Caused by:
could not archive source file `protocols`
Caused by:
Is a directory (os error 21)
kornelski, jpeddicord, dsseng, ysimonson and thomwiggers
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
elinorbgr commentedon May 28, 2016
Hmm, last time I tried to publish something, I worked around the issue by copying the directory in place of the symlink and it worked fine.
Now, it doesn't any more, and I didn't update cargo in the meantime... I don't understand what's going on.
elinorbgr commentedon May 28, 2016
Thanks to @SimonSapin I understood what's going on: cargo uses the git index to list the files to package.But the symlink is listed as a plain file in this index, not as a directory (and that's caused my other error: I didn't
git add
the directory after copying it).Needless to say I'd really like this to work again (I use the symlink because this "protocols" directory is shared between two projects), but I understand I'd be more than a simple bugfix.
emberian commentedon Oct 30, 2016
This isn't always quite as simple to workaround when the symlink is in a submodule that you don't really have the ability to modify...
davechallis commentedon Aug 24, 2018
Are there currently any good workarounds for this? I'm working on a project which uses a 3rd party submodule (which itself contains submodules), and which makes heavy use of symlinks throughout its directory structure (which makes modifying it non-trivial).
This also affects the
cargo package
command, so maybe needs a label for that adding?Directly embed protos rather than submoduling pachyderm, to avoid a c…
Auto merge of #6817 - thomwiggers:fix-2748, r=ehuss