{"action":"created","issue":{"url":"https://api.github.com/repos/alexcrichton/cargo-vendor/issues/140","repository_url":"https://api.github.com/repos/alexcrichton/cargo-vendor","labels_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/issues/140/labels{/name}","comments_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/issues/140/comments","events_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/issues/140/events","html_url":"https://github.com/alexcrichton/cargo-vendor/issues/140","id":376457699,"node_id":"MDU6SXNzdWUzNzY0NTc2OTk=","number":140,"title":"0.1.17 breaks vendoring when you have replacement sources from git checkouts","user":{"login":"froydnj","id":151096,"node_id":"MDQ6VXNlcjE1MTA5Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/151096?v=4","gravatar_id":"","url":"https://api.github.com/users/froydnj","html_url":"https://github.com/froydnj","followers_url":"https://api.github.com/users/froydnj/followers","following_url":"https://api.github.com/users/froydnj/following{/other_user}","gists_url":"https://api.github.com/users/froydnj/gists{/gist_id}","starred_url":"https://api.github.com/users/froydnj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/froydnj/subscriptions","organizations_url":"https://api.github.com/users/froydnj/orgs","repos_url":"https://api.github.com/users/froydnj/repos","events_url":"https://api.github.com/users/froydnj/events{/privacy}","received_events_url":"https://api.github.com/users/froydnj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-11-01T16:03:08Z","updated_at":"2018-11-01T16:38:05Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Firefox uses a custom fork of `serde`; its `.cargo/config.in` contains:\r\n\r\n```\r\n[source.crates-io]\r\nregistry = 'https://github.com/rust-lang/crates.io-index'\r\nreplace-with = 'vendored-sources'\r\n\r\n[source.\"https://github.com/servo/serde\"]\r\ngit = \"https://github.com/servo/serde\"\r\nbranch = \"deserialize_from_enums8\"\r\nreplace-with = \"vendored-sources\"\r\n```\r\n\r\nMy local cargo git cache (is that what it's called?) for `serde` looks like:\r\n\r\n```\r\nfroydnj@hawkeye:~/src/gecko-dev.git$ ls -l /home/froydnj/.cargo/git/checkouts/serde-7c389ead256ba659/c4457d8/\r\ntotal 64\r\n-rw-r--r-- 1 froydnj froydnj   499 Nov  1 12:00 appveyor.yml\r\n-rw-r--r-- 1 froydnj froydnj   125 Nov  1 12:00 Cargo.toml\r\n-rw-r--r-- 1 froydnj froydnj  2334 Nov  1 12:00 CONTRIBUTING.md\r\n-rw-r--r-- 1 froydnj froydnj  1606 Nov  1 12:00 crates-io.md\r\n-rw-r--r-- 1 froydnj froydnj 10847 Nov  1 12:00 LICENSE-APACHE\r\n-rw-r--r-- 1 froydnj froydnj  1071 Nov  1 12:00 LICENSE-MIT\r\n-rw-r--r-- 1 froydnj froydnj  3183 Nov  1 12:00 README.md\r\n-rw-r--r-- 1 froydnj froydnj    31 Nov  1 12:00 rustfmt.toml\r\ndrwxr-xr-x 3 froydnj froydnj  4096 Nov  1 12:00 serde\r\ndrwxr-xr-x 3 froydnj froydnj  4096 Nov  1 12:00 serde_derive\r\ndrwxr-xr-x 2 froydnj froydnj  4096 Nov  1 12:00 serde_derive_internals\r\ndrwxr-xr-x 3 froydnj froydnj  4096 Nov  1 12:00 serde_test\r\ndrwxr-xr-x 5 froydnj froydnj  4096 Nov  1 12:00 test_suite\r\n-rwxr-xr-x 1 froydnj froydnj  2354 Nov  1 12:00 travis.sh\r\n```\r\n\r\nWhen I use `cargo-vendor` 0.1.17 or above to try to re-vendor some changes, I get peculiar error messages:\r\n\r\n```\r\nfroydnj@hawkeye:~/src/gecko-dev.git$ ./mach vendor rust --ignore-modified\r\n    Updating registry `https://github.com/rust-lang/crates.io-index`\r\n\r\nCaused by:\r\n  failed to load pkg lockfile\r\n\r\nCaused by:\r\n  failed to resolve patches for `https://github.com/rust-lang/crates.io-index`\r\n\r\nCaused by:\r\n  failed to load source for a dependency on `serde_derive`\r\n\r\nCaused by:\r\n  Unable to update https://github.com/servo/serde?branch=deserialize_from_enums8#c4457d80\r\n\r\nCaused by:\r\n  Could not find `Cargo.toml` in `/home/froydnj/.cargo/git/checkouts/serde-7c389ead256ba659/c4457d8/serde_derive`\r\n...\r\n  File \"/home/froydnj/src/gecko-dev.git/python/mozbuild/mozbuild/vendor_rust.py\", line 320, in vendor\r\n    subprocess.check_call([cargo, 'vendor', '--quiet', '--sync', 'Cargo.lock'] + [vendor_dir], cwd=self.topsrcdir)\r\n```\r\n\r\nThere's some Firefox-specific stuff in there, but the core idea is that we invoked `cargo vendor --quiet --sync Cargo.lock $VENDOR_DIR` and we get the above.  My cached serde checkout now looks like:\r\n\r\n```\r\nfroydnj@hawkeye:~/src/gecko-dev.git$ ls -l /home/froydnj/.cargo/git/checkouts/serde-7c389ead256ba659/c4457d8/\r\ntotal 60\r\n-rw-r--r-- 1 froydnj froydnj   499 Nov  1 12:00 appveyor.yml\r\n-rw-r--r-- 1 froydnj froydnj   125 Nov  1 12:00 Cargo.toml\r\n-rw-r--r-- 1 froydnj froydnj  2334 Nov  1 12:00 CONTRIBUTING.md\r\n-rw-r--r-- 1 froydnj froydnj  1606 Nov  1 12:00 crates-io.md\r\n-rw-r--r-- 1 froydnj froydnj 10847 Nov  1 12:00 LICENSE-APACHE\r\n-rw-r--r-- 1 froydnj froydnj  1071 Nov  1 12:00 LICENSE-MIT\r\n-rw-r--r-- 1 froydnj froydnj  3183 Nov  1 12:00 README.md\r\n-rw-r--r-- 1 froydnj froydnj    31 Nov  1 12:00 rustfmt.toml\r\ndrwxr-xr-x 3 froydnj froydnj  4096 Nov  1 12:00 serde\r\ndrwxr-xr-x 2 froydnj froydnj  4096 Nov  1 12:00 serde_derive_internals\r\ndrwxr-xr-x 3 froydnj froydnj  4096 Nov  1 12:00 serde_test\r\ndrwxr-xr-x 5 froydnj froydnj  4096 Nov  1 12:00 test_suite\r\n-rwxr-xr-x 1 froydnj froydnj  2354 Nov  1 12:00 travis.sh\r\n```\r\n\r\nSomehow, the `serde_derive` directory from the checkout has gotten deleted.  I don't exactly understand how the fix for #130 is responsible for this, but this seems like a bad thing.  My suspicion is that cargo doesn't try very hard to re-download git checkouts, or something?\r\n\r\n/cc @luser @alexcrichton "},"comment":{"url":"https://api.github.com/repos/alexcrichton/cargo-vendor/issues/comments/435102178","html_url":"https://github.com/alexcrichton/cargo-vendor/issues/140#issuecomment-435102178","issue_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/issues/140","id":435102178,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNTEwMjE3OA==","user":{"login":"froydnj","id":151096,"node_id":"MDQ6VXNlcjE1MTA5Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/151096?v=4","gravatar_id":"","url":"https://api.github.com/users/froydnj","html_url":"https://github.com/froydnj","followers_url":"https://api.github.com/users/froydnj/followers","following_url":"https://api.github.com/users/froydnj/following{/other_user}","gists_url":"https://api.github.com/users/froydnj/gists{/gist_id}","starred_url":"https://api.github.com/users/froydnj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/froydnj/subscriptions","organizations_url":"https://api.github.com/users/froydnj/orgs","repos_url":"https://api.github.com/users/froydnj/repos","events_url":"https://api.github.com/users/froydnj/events{/privacy}","received_events_url":"https://api.github.com/users/froydnj/received_events","type":"User","site_admin":false},"created_at":"2018-11-01T16:38:05Z","updated_at":"2018-11-01T16:38:05Z","author_association":"CONTRIBUTOR","body":"Ah, because we have:\r\n\r\n```\r\nlibudev-sys = { path = \"dom/webauthn/libudev-sys\" }\r\nserde_derive = { git = \"https://github.com/servo/serde\", branch = \"deserialize_from_enums8\" }\r\n```\r\n\r\nin Cargo.toml, so we're only replacing `serde_derive` with our custom checkout, not all of `serde`?"}}
{"actor":{"display_login":"froydnj"}}