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

remove Cargo.lock from gitignore and commit it #15

Open
quantenzitrone opened this issue Jan 28, 2025 · 5 comments
Open

remove Cargo.lock from gitignore and commit it #15

quantenzitrone opened this issue Jan 28, 2025 · 5 comments

Comments

@quantenzitrone
Copy link

https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
https://doc.rust-lang.org/cargo/faq.html#why-have-cargolock-in-version-control

The purpose of a Cargo.lock lockfile is to describe the state of the world at the time of a successful build. Cargo uses the lockfile to provide deterministic builds at different times and on different systems, by ensuring that the exact same dependencies and versions are used as when the Cargo.lock file was originally generated.

your .gitignore even says:

Remove Cargo.lock from gitignore if creating an executable, leave it for libraries

@quantenzitrone
Copy link
Author

also point your two dependencies on local directories to the respective online repos so others can build it without having to go searching for these

@dividebysandwich
Copy link
Owner

dividebysandwich commented Jan 28, 2025

Hi,
Roger on the Cargo.lock file. However, I can't seem to add the git url for my forked dnglab because I use rawler which is in a subdirectory, and Cargo does not seem to be able to pick up on that. I cannot specify git and path at the same time either.

warning: unused manifest key: package.website
Updating git repository `https://github.com/dividebysandwich/imagepipe`
Updating git repository `https://github.com/dividebysandwich/dnglab`
error: no matching package named `rawler` found
location searched: https://github.com/dividebysandwich/imagepipe#2bdc49e8

This is with the following in Cargo.toml:

imagepipe = { git = "https://github.com/dividebysandwich/imagepipe" }
rawler = { git = "https://github.com/dividebysandwich/dnglab" }

@quantenzitrone
Copy link
Author

that is weird
another solution would be adding them as submodules

@dividebysandwich
Copy link
Owner

Maybe, but I'd like to keep the repos separate so they're easier to maintain and keep up with upstream. I'm not sure why it can't find rawler. I suspect it's not even looking in dnglab, since the error message lists only imagepipe as "locations searched"...

@quantenzitrone
Copy link
Author

When I try it, the problem is that your fork of imagepipe also depends on a local repository of rawler.
So you'd have to fix that first.

error: no matching package named rawler found
location searched: https://github.com/dividebysandwich/imagepipe#2bdc49e8
required by package imagepipe v0.5.0 (https://github.com/dividebysandwich/imagepipe#2bdc49e8)
... which satisfies git dependency imagepipe of package lightningview v1.8.0 (/data/documents/programming/github.com/LightningView)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants