rust-lang / rust-lang/cargo

tries to clone/init nonexisting repos into cache

Open
#5,154 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Cargo.toml:

[package]
name = "bugtest"
version = "0.1.0"
authors = ["me"]
[dependencies]
bla = { git = "https://github.com/rust-lang/carg" }

The repo rust-lang/carg does not exist, yet when I try to build the project, cargo will create a
~CARGO_HOME/git/db/carg-27f1e31d26f0744d with some kind of empty bare repo inside it which is weird.
(Also an error message will be show which seems fine)

Can we first validate the url before touching the cache?

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

Reproduce the build using the Cargo.toml dependency URL and inspect the CARGO_HOME/git/db/carg-27f1e31d26f0744d path created for the nonexistent repository. Trace the repository-fetch entry point and verify that the existing error is preserved without creating an empty cache repository.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.