Skip to content

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

Merged
bors-servo merged 1 commit into
servo:masterfrom
m-novikov:tidy-ignore-without-duplicates
Nov 22, 2017
Merged

bors-servo merged 1 commit into
servo:masterfrom
m-novikov:tidy-ignore-without-duplicates

Conversation

@m-novikov

@m-novikov m-novikov commented Nov 21, 2017 •

Copy link
Copy Markdown
Contributor

Resolves: #19306


  • There are tests for these changes

This change is Reviewable

@highfive

Copy link
Copy Markdown

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
Copy Markdown

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

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Nov 21, 2017
@m-novikov
m-novikov force-pushed the tidy-ignore-without-duplicates branch from 06ef60b to 067ce4f Compare November 21, 2017 18:42
Comment thread python/tidy/servo_tidy/tidy.py Outdated
if has_duplicates and duplicates_allowed:
continue

if not (has_duplicates or duplicates_allowed):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread python/tidy/servo_tidy/tidy.py Outdated

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

single

@KiChjang

Copy link
Copy Markdown
Contributor

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

@jdm jdm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with KiChjang's comments.

@jdm jdm added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Nov 21, 2017
@m-novikov
m-novikov force-pushed the tidy-ignore-without-duplicates branch from 067ce4f to df8d9e4 Compare November 21, 2017 20:06
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Nov 21, 2017
@m-novikov
m-novikov force-pushed the tidy-ignore-without-duplicates branch from df8d9e4 to e6d9fd8 Compare November 21, 2017 20:08
@jdm

jdm commented Nov 22, 2017

Copy link
Copy Markdown
Member

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

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit e6d9fd8 has been approved by jdm

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Nov 22, 2017
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit e6d9fd8 with merge a812af5...

bors-servo pushed 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
Copy Markdown
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev
Approved by: jdm
Pushing a812af5 to master...

@bors-servo
bors-servo merged commit e6d9fd8 into servo:master Nov 22, 2017
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Nov 22, 2017
@m-novikov
m-novikov deleted the tidy-ignore-without-duplicates branch November 22, 2017 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Report an error if a package has duplicates allowed but there are no duplicates

5 participants