rust-lang / rust-lang/cargo

Git dependency with LFS objects

Open
#9,692 4 comments 12 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-git C-feature-request S-triage
Dominant language
Rust
Stars
15.5k
Forks
3k
Avg merge
23h 30m
Merged PRs (30d)
51

Description

Describe the problem you are trying to solve

I'm trying to add a (non public) crate as a git dependency. The linked git repository stores binary files with git LFS. Those binary files are then included in the code with the relevant macros (include_str/include_bytes).

Right now, the lfs objects are not retrieved.

Describe the solution you'd like
I would be great to have the possibility to specify something along the line: some-crate = { git = "<git repo>, use-lfs=true } when declaring a dependency.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading Cargo's documentation for specifying dependencies from Git repositories and the issue's description of Git LFS objects used by include_str/include_bytes. Investigate the Git dependency retrieval entry point and determine how LFS support could be configured. Done means LFS objects are retrieved for the dependency and the requested configuration is documented and tested.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, rust
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.