Skip to content
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

Add a local filesystem registry type #2212

Closed
brson opened this Issue Dec 16, 2015 · 7 comments

Comments

Projects
None yet
7 participants
@brson
Copy link
Contributor

brson commented Dec 16, 2015

For the purpose of packaging Rust applications, Debian (and likely other distros) wants to also package all of the application's dependencies. They have tried doing this be rewriting registry dependencies into path dependencies and found it burdensome. What we want them to be able to do is construct a directory tree on the local filesystem that cargo understands as a new type of registry, and override cargo to use it instead of crates.io

The layout of this directory structure needs to be easily reproduced through scripting.

@sfackler

This comment has been minimized.

Copy link
Member

sfackler commented Dec 18, 2015

@warner

This comment has been minimized.

Copy link

warner commented Dec 20, 2015

I've found myself wanting a way to use cargo offline (on a plane): telling it to skip the registry-update step and just use the cached index+tarballs that it fetched last time. A filesystem registry type might be an elegant way to accomplish that, if the filesystem and "normal" registries share the same format (and even the same disk location), but the filesystem type doesn't do an update each time you run cargo. Then I could switch between online and offline modes by just editing the prefix of the [registry] index= field in .cargo/config.

@marcbowes

This comment has been minimized.

Copy link
Contributor

marcbowes commented Dec 28, 2015

Isn't this already supported (poorly)? You can set registry.index to the filesystem by using file://. The only niggle is that you have to do a git commit in the filesystem registry.

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Jan 11, 2016

@marcbowes sorta, yeah, but it's pretty painful and not exactly intended for that purpose :)

@marcbowes

This comment has been minimized.

Copy link
Contributor

marcbowes commented Jan 11, 2016

Agreed on the painful (this is what I'm doing at work). I just wanted to point out that you can work around this without rewriting Cargo.toml files.

@joshtriplett

This comment has been minimized.

Copy link
Member

joshtriplett commented May 24, 2016

@warner I encountered the same problem on a plane. I made a minor tweak to my Cargo.toml file, and cargo then refused to proceed without updating, which it couldn't do offline. I'd like to download an offline snapshot of a pile of Cargo dependencies, so that I can always build.

@carols10cents

This comment has been minimized.

Copy link
Member

carols10cents commented Sep 12, 2017

I believe the main request in this issue is addressed by https://github.com/alexcrichton/cargo-vendor and https://github.com/alexcrichton/cargo-local-registry, and the offline issues are covered by #1882 and #3479.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.