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

Report an errror if a package has duplicates allowed but there are no duplicates #19325

Merged
merged 1 commit into from Nov 22, 2017

Conversation

@m-novikov
Copy link
Contributor

m-novikov commented Nov 21, 2017

Resolves: #19306


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #19306 (github issue number if applicable).
  • There are tests for these changes

This change is Reviewable

@highfive
Copy link

highfive commented Nov 21, 2017

Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @KiChjang (or someone else) soon.

@highfive
Copy link

highfive commented Nov 21, 2017

Heads up! This PR modifies the following files:

  • @wafflespeanut: python/tidy/servo_tidy_tests/test_tidy.py, python/tidy/servo_tidy/tidy.py
  • @edunham: python/tidy/servo_tidy_tests/test_tidy.py, python/tidy/servo_tidy/tidy.py
@m-novikov m-novikov force-pushed the m-novikov:tidy-ignore-without-duplicates branch from 06ef60b to 067ce4f Nov 21, 2017
if has_duplicates and duplicates_allowed:
continue

if not (has_duplicates or duplicates_allowed):

This comment has been minimized.

Copy link
@KiChjang

KiChjang Nov 21, 2017

Member

This combined with the line above looks like an exclusive-or to me. Perhaps you can combine the two conditions and use == instead?

continue

message = "duplicate versions for package `{}`".format(name)
if duplicates_allowed:
message = 'duplicates for {} is allowed, but only signle version found'.format(name)

This comment has been minimized.

Copy link
@KiChjang

KiChjang Nov 21, 2017

Member

single

@KiChjang
Copy link
Member

KiChjang commented Nov 21, 2017

My python-fu is still subpar, so I'm going to have to redirect this. r? @jdm

@highfive highfive assigned jdm and unassigned KiChjang Nov 21, 2017
Copy link
Member

jdm left a comment

I agree with KiChjang's comments.

@m-novikov m-novikov force-pushed the m-novikov:tidy-ignore-without-duplicates branch from 067ce4f to df8d9e4 Nov 21, 2017
@m-novikov m-novikov force-pushed the m-novikov:tidy-ignore-without-duplicates branch from df8d9e4 to e6d9fd8 Nov 21, 2017
@jdm
Copy link
Member

jdm commented Nov 22, 2017

@bors-servo: r+
Thanks for fixing this!

@bors-servo
Copy link
Contributor

bors-servo commented Nov 22, 2017

📌 Commit e6d9fd8 has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Nov 22, 2017

Testing commit e6d9fd8 with merge a812af5...

bors-servo added a commit that referenced this pull request Nov 22, 2017
Report an errror if a package has duplicates allowed but there are no duplicates

Resolves: #19306

<!-- Please describe your changes on the following line: -->

---
<!-- 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 #19306 (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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/19325)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Nov 22, 2017

@bors-servo bors-servo merged commit e6d9fd8 into servo:master Nov 22, 2017
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@m-novikov m-novikov deleted the m-novikov:tidy-ignore-without-duplicates branch Nov 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

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