-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Finding the remote of Cargo’s checkouts of git dependencies #3
Comments
If you add |
OK actually the situation is better (and worse) than it appears. We have code running on our server that knows how to obtain the sources of crates and make them available. It decodes the cargo registry crate paths. So in fact crates under the cargo registry and also the Rust stdlib should have sources in Pernosco. Unfortunately they don't show up. What's happening is that because you didn't whitelist the source dirs in pernosco-submit, pernosco-submit uploads placeholder files with the "not whitelisted" message, which then override the files that our Rust tooling provides :-(. |
I think we should probably change pernosco-submit so that the placeholder files are moved to a separate |
However, that won't fit this particular issue, because we don't handle cargo checkouts. In fact I don't think we can without the Cargo changes you mentioned. |
Note that for our purposes we don't need the checkout directories to be actual git checkouts. We just need some way for Cargo to expose a URL to the remote that pernosco-submit can discover. |
Actually it's probably better to create a way to explicitly prioritize mount rules in the sources JSON. |
@SimonSapin if you could resubmit with this pernosco-submit branch: https://github.com/Pernosco/pernosco-submit/tree/placeholders things should be better. Let me know if it works, so if it does I'll merge it to master. It won't fix this bug, but it should mean e.g. the source to the backtrace crate is present in Pernosco. |
For now I think if you submit with /home/simon/.cargo/git/checkouts whitelisted on the pernosco-submit command line, then in combination with that fix you should probably have a fairly good experience. |
I uploaded the same trace again with the
Maybe that’s expected? Anyway, this debugging session did not happen to lead to a missing source file, and I understand that allowing more directories would help if a future one does. I filed this since it seems that making Cargo dependencies in public git repos "just work" would improve the tool and reduce resource usage. |
I got the pernosco-submit change all wrong :-( |
OK I fixed up pernosco-submit and actually tested it, and it worked so I pushed to pernosco-submit master. You'll still get the same pernosco-submit output I guess, but the sources for published crates and Rust stdlib should work now. |
I suppose pernosco-submit could suppress warnings about not being authorized to upload cargo registry sources, since we're going to find them anyway. |
Done that. |
Using
pernosco-submit
with Servo resulted in 14 lines like:In that directory:
That directory in turn is a bare repository that doesn’t have any remote configured.
Unfortunately I don’t know if there’s a solution to this without modifying Cargo. Even with a special case for
$CARGO_HOME/git/checkouts/*/*
, the hex part of the directory name is probably a non-reversible hash.Maybe Cargo would be open to accepting changes as long as they’re not hard to achieve with libgit2, such as making
git/checkouts/*/*
be work trees rather than full clones, and configuring the remote ingit/db/*
The text was updated successfully, but these errors were encountered: