Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upMake tidy reject duplicate crates with same version number & different source #14695
Labels
Comments
bors-servo
added a commit
that referenced
this issue
Dec 26, 2016
Tidy: Check Cargo.lock for packages with same version and different sources <!-- Please describe your changes on the following line: --> r? @wafflespeanut cc @SimonSapin --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #14695 <!-- Either: --> - [X] There are tests for these changes <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14715) <!-- Reviewable:end -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Before #14633, we were compiling two copies of the
freetypecrate../mach test-tidyhas a lint to prevent that from happening, but it didn’t in this case. I’m guessing this is because both copies had the same version number. But Cargo still considers them different, and therefore includes them both, because they have different sources: crates.io, and a git repository.The relevant code is in the
check_lockfunction inpython/tidy/servo_tidy/tidy.py.@wafflespeanut, @Ms2ger, is there a reason this code considers version numbers at all? Rather than looking for multiple
[[package]]sections with the same name.