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

Cargo generates lockfile with duplicate package #2981

Closed
Zoxc opened this issue Aug 10, 2016 · 4 comments
Closed

Cargo generates lockfile with duplicate package #2981

Zoxc opened this issue Aug 10, 2016 · 4 comments
Labels
A-diagnostics Area: Error and warning messages generated by Cargo itself. A-lockfile Area: Cargo.lock issues S-needs-info Status: Needs more info, such as a reproduction or more background for a feature request. S-propose-close Status: A team member has nominated this for closing, pending further input from the team

Comments

@Zoxc
Copy link
Contributor

Zoxc commented Aug 10, 2016

When rebuilding this project which overrides rustc's libc_shim I get the error thread 'main' panicked at 'a package was referenced twice in the lockfile', src/cargo\core\resolver\encode.rs:51

The lockfile with multiple libc packages

This is on my cargo branch based on e958281

@alexcrichton alexcrichton added the A-diagnostics Area: Error and warning messages generated by Cargo itself. label Aug 10, 2016
@bkchr
Copy link

bkchr commented Jun 26, 2017

Hi, I have the same problem. I'm having the following project structure:
Masterproject uses ProjectA and ProjectB. ProjectB and ProjectA both using ProjectC(same version for both). Now cargo generates a Cargo.lock file with ProjectC being present two times. All of these projects are included by being git submodules and the Cargo.toml uses the path to the submodule.

My cargo version: cargo 0.19.0 (28d1d60 2017-05-16)

Removing the duplicate entry by hand let's cargo compile the project, but the duplicate is added again..

@epage epage added A-lockfile Area: Cargo.lock issues S-triage Status: This issue is waiting on initial triage. labels May 24, 2023
@epage
Copy link
Contributor

epage commented Oct 3, 2023

Does anyone have a minimal reproduction case for this?

I tried loading up the avery one in case I could reproduce with HEAD but there are other setup steps that I didn't want to guess my way through as then I wouldn't be sure if see no bug if cargo is fixed or if I did something wrong.

In avery's case, a replace is being used. Unsure about the other case. I'd be surprised if these are still busted 7 years later and wonder if we should close if we there aren't more details to go off of.

EDIT: I marked this as "propose close" so we don't lose track of this in case no reproduction steps become available.

@epage epage added S-needs-info Status: Needs more info, such as a reproduction or more background for a feature request. S-propose-close Status: A team member has nominated this for closing, pending further input from the team and removed S-triage Status: This issue is waiting on initial triage. labels Oct 3, 2023
@Eh2406
Copy link
Contributor

Eh2406 commented Oct 4, 2023

I would not be surprised if a bug still exists, but without a reproducer 🤷. +1 on closing if a no activity soon.

@weihanglo
Copy link
Member

Close due to inactivity. Feel free to reopen one when having a minimal producer. Thank you.

@weihanglo weihanglo closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Error and warning messages generated by Cargo itself. A-lockfile Area: Cargo.lock issues S-needs-info Status: Needs more info, such as a reproduction or more background for a feature request. S-propose-close Status: A team member has nominated this for closing, pending further input from the team
Projects
None yet
Development

No branches or pull requests

6 participants