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

Use crates.io over git for dependencies #950

Open
djacu opened this issue Dec 18, 2024 · 0 comments · May be fixed by #951
Open

Use crates.io over git for dependencies #950

djacu opened this issue Dec 18, 2024 · 0 comments · May be fixed by #951

Comments

@djacu
Copy link

djacu commented Dec 18, 2024

Problem

The presence of git dependencies can be problematic for build systems like Nix. progenitor as a git dependencies and progenitor-client as a registry causes the build to fail because it tries to vendor progenitor-client from two places: from crates.io as a direct dependency, and from GitHub as a transitive dependency of progenitor.

I would like to add oxide-rs to nixpkgs. Currently, I have a draft PR in using my fork and some modifications to make packaging possible and so @sarcasticadmin and I can test the CLI application. NixOS/nixpkgs#366077

Solution

  • Use the registry for dependencies when possible. It is most important when a diamond dependency can be created as in the case of progenitor.
  • Use the patch mechanism of cargo to change the source of dependencies during development. As is currently being done here:
    #[patch."https://github.com/oxidecomputer/progenitor"]
    .

Other

A secondary ask but not currently critical to resolving this issue. Please consider publishing oxnet and thouart to crates.io. It would make packaging the software in nixpkgs easier as we would not have to vendor the lock file.

@djacu djacu linked a pull request Dec 18, 2024 that will close this issue
djacu added a commit to djacu/oxide.rs that referenced this issue Dec 18, 2024
The presence of git dependencies can be problematic for build systems
like Nix. `progenitor` as a git dependencies and `progenitor-client` as
a registry causes the build to fail because it tries to vendor
`progenitor-client` from two places: from crates.io as a direct
dependency, and from GitHub as a transitive dependency of `progenitor`.

This commit changes the Cargo.toml and lock file to pull `progenitor`
from the registry instead of GitHub.

Fixes oxidecomputer#950
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

Successfully merging a pull request may close this issue.

1 participant