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

Use the ParserContext along with the Parser #14373

Merged
merged 2 commits into from Nov 27, 2016
Merged

Conversation

@wafflespeanut
Copy link
Member

wafflespeanut commented Nov 26, 2016

This changes the parse function's signature to include ParserContext, so that we don't introduce another trait just for the sake of the context. Instead, we can safely ignore the context whenever we don't need it.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes do not require tests because it's a refactor

r? @SimonSapin or @emilio or @Manishearth


This change is Reviewable

@highfive
Copy link

highfive commented Nov 26, 2016

Heads up! This PR modifies the following files:

  • @bholley: components/style/values/specified/basic_shape.rs, components/style/properties/longhand/background.mako.rs, components/style/properties/longhand/text.mako.rs, components/style/properties/longhand/position.mako.rs, components/style/values/specified/length.rs, components/style/properties/longhand/outline.mako.rs, components/style/properties/longhand/list.mako.rs, components/style/properties/properties.mako.rs, components/style/properties/longhand/xul.mako.rs, components/style/properties/longhand/padding.mako.rs, components/style/properties/longhand/font.mako.rs, components/style/properties/shorthand/border.mako.rs, components/style/properties/longhand/pointing.mako.rs, components/style/properties/longhand/inherited_text.mako.rs, components/style/properties/longhand/effects.mako.rs, components/style/properties/shorthand/box.mako.rs, components/style/parser.rs, components/style/values/specified/mod.rs, components/style/properties/longhand/color.mako.rs, components/style/properties/shorthand/outline.mako.rs, components/style/properties/longhand/border.mako.rs, components/style/properties/longhand/box.mako.rs, components/style/values/specified/image.rs, components/style/custom_properties.rs, components/style/values/mod.rs, components/style/properties/shorthand/position.mako.rs, components/style/properties/helpers.mako.rs, components/style/properties/longhand/column.mako.rs, components/style/values/specified/position.rs, components/style/properties/longhand/inherited_svg.mako.rs
  • @emilio: components/style/values/specified/basic_shape.rs, components/style/properties/longhand/background.mako.rs, components/style/properties/longhand/text.mako.rs, components/style/properties/longhand/position.mako.rs, components/style/values/specified/length.rs, components/style/properties/longhand/outline.mako.rs, components/style/properties/longhand/list.mako.rs, components/style/properties/properties.mako.rs, components/style/properties/longhand/xul.mako.rs, components/style/properties/longhand/padding.mako.rs, components/style/properties/longhand/font.mako.rs, components/style/properties/shorthand/border.mako.rs, components/style/properties/longhand/pointing.mako.rs, components/style/properties/longhand/inherited_text.mako.rs, components/style/properties/longhand/effects.mako.rs, components/style/properties/shorthand/box.mako.rs, components/style/parser.rs, components/style/values/specified/mod.rs, components/style/properties/longhand/color.mako.rs, components/style/properties/shorthand/outline.mako.rs, components/style/properties/longhand/border.mako.rs, components/style/properties/longhand/box.mako.rs, components/style/values/specified/image.rs, components/style/custom_properties.rs, components/style/values/mod.rs, components/style/properties/shorthand/position.mako.rs, components/style/properties/helpers.mako.rs, components/style/properties/longhand/column.mako.rs, components/style/values/specified/position.rs, components/style/properties/longhand/inherited_svg.mako.rs
@highfive
Copy link

highfive commented Nov 26, 2016

warning Warning warning

  • These commits modify style code, but no tests are modified. Please consider adding a test!
@wafflespeanut wafflespeanut force-pushed the wafflespeanut:parse branch from f86aad9 to a367045 Nov 26, 2016
@wafflespeanut wafflespeanut mentioned this pull request Nov 26, 2016
2 of 5 tasks complete
@emilio
Copy link
Member

emilio commented Nov 26, 2016

Looks good I guess, I'm kind of sad to see all those _context arguments, but I think it's good to be consistent, and arguably the approach I described over in #14370 is slightly harder to reason about.

@bors-servo r+

@bors-servo
Copy link
Contributor

bors-servo commented Nov 26, 2016

📌 Commit a367045 has been approved by emilio

@highfive highfive assigned emilio and unassigned SimonSapin Nov 26, 2016
@bors-servo
Copy link
Contributor

bors-servo commented Nov 26, 2016

Testing commit a367045 with merge 6b92c54...

bors-servo added a commit that referenced this pull request Nov 26, 2016
Use the ParserContext along with the Parser

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

This changes the `parse` function's signature to include `ParserContext`, so that we don't introduce another trait just for the sake of the context. Instead, we can safely ignore the context whenever we don't need it.

---
<!-- 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

<!-- Either: -->
- [x] These changes do not require tests because it's a refactor
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

r? @SimonSapin or @emilio or @Manishearth

<!-- 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/14373)
<!-- Reviewable:end -->
@wafflespeanut
Copy link
Member Author

wafflespeanut commented Nov 26, 2016

Thanks! :)

@wafflespeanut
Copy link
Member Author

wafflespeanut commented Nov 26, 2016

@bors-servo r-

Oops. I've missed something.

@wafflespeanut wafflespeanut force-pushed the wafflespeanut:parse branch from a367045 to 140699e Nov 26, 2016
@wafflespeanut
Copy link
Member Author

wafflespeanut commented Nov 26, 2016

Forgot to update the tests...

error: aborting due to 472 previous errors
@emilio
Copy link
Member

emilio commented Nov 26, 2016

Heh, good luck with those, most should be from macros so shouldn't be that much, hopefully.

r=me when those are fixed.

@wafflespeanut wafflespeanut force-pushed the wafflespeanut:parse branch from 140699e to 0e2315c Nov 26, 2016
@wafflespeanut
Copy link
Member Author

wafflespeanut commented Nov 26, 2016

@bors-servo r=emilio

@bors-servo
Copy link
Contributor

bors-servo commented Nov 26, 2016

📌 Commit 0e2315c has been approved by emilio

@Manishearth
Copy link
Member

Manishearth commented Nov 26, 2016

I don't really agree with this. It's pretty easy to introduce two traits where one trait delegates to another when there's no context.

But it's fine, I guess.

@bors-servo
Copy link
Contributor

bors-servo commented Nov 26, 2016

Testing commit 0e2315c with merge e8a3b6f...

bors-servo added a commit that referenced this pull request Nov 26, 2016
Use the ParserContext along with the Parser

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

This changes the `parse` function's signature to include `ParserContext`, so that we don't introduce another trait just for the sake of the context. Instead, we can safely ignore the context whenever we don't need it.

---
<!-- 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

<!-- Either: -->
- [x] These changes do not require tests because it's a refactor
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

r? @SimonSapin or @emilio or @Manishearth

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

bors-servo commented Nov 26, 2016

💔 Test failed - linux-dev

@wafflespeanut
Copy link
Member Author

wafflespeanut commented Nov 27, 2016

I don't really agree with this. It's pretty easy to introduce two traits where one trait delegates to another when there's no context.

Yes, that's what @emilio had suggested earlier. I thought it'd be better to have an unused argument in the function instead of introducing another trait. We're complicating things by introducing more things, which could otherwise be solved by a refactor.

@wafflespeanut
Copy link
Member Author

wafflespeanut commented Nov 27, 2016

Looks like the latest merge has affected my PR. Hmph.

@wafflespeanut wafflespeanut force-pushed the wafflespeanut:parse branch from 0e2315c to f290a6f Nov 27, 2016
@wafflespeanut
Copy link
Member Author

wafflespeanut commented Nov 27, 2016

@bors-servo r=emilio

@bors-servo
Copy link
Contributor

bors-servo commented Nov 27, 2016

📌 Commit f290a6f has been approved by emilio

@bors-servo
Copy link
Contributor

bors-servo commented Nov 27, 2016

Testing commit f290a6f with merge 4755cb7...

bors-servo added a commit that referenced this pull request Nov 27, 2016
Use the ParserContext along with the Parser

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

This changes the `parse` function's signature to include `ParserContext`, so that we don't introduce another trait just for the sake of the context. Instead, we can safely ignore the context whenever we don't need it.

---
<!-- 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

<!-- Either: -->
- [x] These changes do not require tests because it's a refactor
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

r? @SimonSapin or @emilio or @Manishearth

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

bors-servo commented Nov 27, 2016

💔 Test failed - linux-rel-wpt

@wafflespeanut
Copy link
Member Author

wafflespeanut commented Nov 27, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Nov 27, 2016

Previous build results for arm32, arm64, linux-dev, linux-rel-css, mac-dev-unit, mac-rel-css, mac-rel-wpt1, mac-rel-wpt2, windows-dev are reusable. Rebuilding only linux-rel-wpt...

@bors-servo
Copy link
Contributor

bors-servo commented Nov 27, 2016

💔 Test failed - linux-rel-wpt

@highfive
Copy link

highfive commented Nov 27, 2016

  ▶ TIMEOUT [expected CRASH] /html/semantics/tabular-data/the-table-element/caption-methods.html
  │ 
  │ VMware, Inc.
  │ Gallium 0.4 on softpipe
  │ 3.3 (Core Profile) Mesa 12.0.1
  └ Insertion failed: HierarchyRequest (thread ScriptThread PipelineId { namespace_id: PipelineNamespaceId(0), index: PipelineIndex(1) }, at ../src/libcore/result.rs:837)
@wafflespeanut
Copy link
Member Author

wafflespeanut commented Nov 27, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Nov 27, 2016

Previous build results for arm32, arm64, linux-dev, linux-rel-css, mac-dev-unit, mac-rel-css, mac-rel-wpt1, mac-rel-wpt2, windows-dev are reusable. Rebuilding only linux-rel-wpt...

@bors-servo
Copy link
Contributor

bors-servo commented Nov 27, 2016

@bors-servo bors-servo merged commit f290a6f into servo:master Nov 27, 2016
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
@bors-servo bors-servo mentioned this pull request Nov 27, 2016
4 of 5 tasks complete
@wafflespeanut wafflespeanut deleted the wafflespeanut:parse branch Feb 7, 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.

None yet

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