-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 way to share Cargo.lock information #4353
Comments
One thing which may work today (I'd have to check) is to just copy some other project's Maybe worth testing? |
This is what we do as of now, and it works. The problem is that we have to manually copy and update the lock. |
Oh awesome! In that case this should be a very easy feature to implement! We'd just need to add a flag and thread it through. |
How would Let's imagine I put together a rust project that depends on the libservo crate, I want the Cargo.lock of my project to use the libservo lock file. So I would do |
Oh I'm thinking that you'd have a checkout of the Servo lockfile somewhere locally, so you'd do somethign like |
Is it possible we could specify it from a dependency? So you could do cargo update --start-from servo? |
I think it may be pretty tricky to get that working. Cargo doesn't even know what the crate servo is until it's halfway through resolution, and if it found at that point a Cargo.lock it'd have to abort everything and restart. From a conceptual point of view I think it'd make more sense to take a raw file, but I can see from a UI perspective it'd be nicer to take a crate on crates.io. |
What about putting in a git url to the project? File system is so clumsy. I don't have particular suggestions on mechanism, but I would like it not to be point to a file deep in some tree. For starters, what if you don't have servo checked out? |
How long does it take to get to that state, for a decent-sized I get that it's conceptually dissatisfying, but I don't think it's too hard to reason about from a user's point of view (which otherwise I'd be concerned about.) |
GitHub seems to have an API to get the file [0] (not sure about other git hosting sites). Maybe we can scan for [0] https://developer.github.com/v3/repos/contents/#get-contents |
I wonder: is this still a requirement for |
Yes. |
Is this feature open for contributions? |
I think this is still along the lines of a reasonable feature to contribute, but I don't think we know well enough what the feature should look like. The first thing to do here is to get a consensus about what the requirements are for a solution and then sketch what the solution might look like. |
See also #5332 |
As this looks like a duplicate of #5332 and that one has the more interesting conversations, I'm going to close this in favor of that one. If there is a reason this should be open still, let us know! |
We would like some way for a crate to depend on libservo and inherit (in some fashion) the pinned dependencies. Currently libraries have their Cargo.locks ignored, which is the correct behavior, but there are special cases where this doesn't work, and Servo's dependence on pinned versions of nightly Rust are one of these cases.
At the Mozilla All Hands this was discussed and a
cargo update --lockfile
was proposed.The text was updated successfully, but these errors were encountered: