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

Make tidy reject duplicate crates with same version number & different source #14695

Closed
SimonSapin opened this issue Dec 23, 2016 · 1 comment
Closed
Labels

Comments

@SimonSapin
Copy link
Member

@SimonSapin SimonSapin commented Dec 23, 2016

Before #14633, we were compiling two copies of the freetype crate. ./mach test-tidy has 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_lock function in python/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.

@SimonSapin SimonSapin added the L-python label Dec 23, 2016
@highfive
Copy link

@highfive highfive commented Dec 23, 2016

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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.