Skip to content

Remove the util crate#14592

Merged
bors-servo merged 1 commit intoservo:masterfrom
asajeffrey:util-goodbye
Dec 15, 2016
Merged

Remove the util crate#14592
bors-servo merged 1 commit intoservo:masterfrom
asajeffrey:util-goodbye

Conversation

@asajeffrey
Copy link
Copy Markdown
Contributor

@asajeffrey asajeffrey commented Dec 14, 2016

This PR removes the util crate.

  • Replaced the spawn_named and clamp functions by appropriate uses of std::thread::Builder::spawn, std::cmp::min and std::cmp::max.
  • Moved opts, prefs and resource_files into a new config crate.
  • Moved remutex and geometry into their own crates.

  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes do not require tests because they are refactorings

This change is Reviewable

@asajeffrey asajeffrey added the I-refactor No impact; the issue is one of maintainability or tidiness. Proposed solution requires refactoring. label Dec 14, 2016
@highfive
Copy link
Copy Markdown

Heads up! This PR modifies the following files:

  • @bholley: components/style/stylesheets.rs, components/style/properties/properties.mako.rs, components/style/parallel.rs, components/style/Cargo.toml, components/style/lib.rs, components/style/traversal.rs, components/style/matching.rs
  • @jgraham: components/webdriver_server/Cargo.toml, components/webdriver_server/lib.rs
  • @KiChjang: components/script/dom/navigatorinfo.rs, components/script/timers.rs, components/net/http_loader.rs, components/net/storage_thread.rs, components/script/dom/create.rs, components/script/Cargo.toml, components/script/script_thread.rs, components/net/resource_thread.rs, components/script/serviceworker_manager.rs, components/script/dom/htmlanchorelement.rs, components/net/lib.rs, components/net/hsts.rs, components/script/dom/servoparser/mod.rs, components/script/dom/testbinding.rs, components/script/dom/xmlhttprequest.rs, components/net/image_cache_thread.rs, components/script/dom/bindings/conversions.rs, components/net/filemanager_thread.rs, components/script/dom/bindings/guard.rs, components/script/dom/userscripts.rs, components/script/dom/htmlmetaelement.rs, components/script/dom/filereader.rs, components/script/dom/mouseevent.rs, components/script/dom/window.rs, components/script/dom/document.rs, components/net_traits/lib.rs, components/net_traits/lib.rs, components/script/dom/bindings/codegen/CodegenRust.py, components/net/Cargo.toml, components/net/chrome_loader.rs, components/net/content_blocker.rs, components/net_traits/pub_domains.rs, components/net_traits/pub_domains.rs, components/script/dom/characterdata.rs, components/net_traits/Cargo.toml, components/net_traits/Cargo.toml, components/script/lib.rs, components/net/connector.rs, components/script/dom/dedicatedworkerglobalscope.rs, components/net/websocket_loader.rs, components/script/script_runtime.rs, components/script/dom/htmliframeelement.rs, components/script/dom/serviceworkerglobalscope.rs
  • @fitzgen: components/script/dom/navigatorinfo.rs, components/profile_traits/Cargo.toml, components/profile_traits/Cargo.toml, components/script/timers.rs, components/debugger/Cargo.toml, components/script/dom/create.rs, components/devtools/actors/timeline.rs, components/script/Cargo.toml, components/profile_traits/lib.rs, components/profile_traits/lib.rs, components/script/script_thread.rs, components/script/serviceworker_manager.rs, components/script/dom/htmlanchorelement.rs, components/debugger/lib.rs, components/script/dom/servoparser/mod.rs, components/profile/Cargo.toml, components/devtools/Cargo.toml, components/script/dom/testbinding.rs, components/script/dom/xmlhttprequest.rs, components/devtools/lib.rs, components/profile/heartbeats.rs, components/profile/mem.rs, components/script/dom/bindings/conversions.rs, components/script/dom/bindings/guard.rs, components/script/dom/userscripts.rs, components/script/dom/htmlmetaelement.rs, components/script/dom/filereader.rs, components/script/dom/mouseevent.rs, components/script/dom/window.rs, components/script/dom/document.rs, components/script/dom/bindings/codegen/CodegenRust.py, components/profile/time.rs, components/profile_traits/time.rs, components/profile_traits/time.rs, components/profile/lib.rs, components/script/dom/characterdata.rs, components/script/lib.rs, components/script/dom/dedicatedworkerglobalscope.rs, components/script/script_runtime.rs, components/script/dom/htmliframeelement.rs, components/script/dom/serviceworkerglobalscope.rs
  • @emilio: components/style/stylesheets.rs, components/style/properties/properties.mako.rs, components/canvas/webgl_paint_thread.rs, components/layout/traversal.rs, components/layout/sequential.rs, components/style/parallel.rs, components/style/Cargo.toml, components/style/lib.rs, components/layout/parallel.rs, components/layout/context.rs, components/layout/construct.rs, components/layout/display_list_builder.rs, components/layout/block.rs, components/style/traversal.rs, components/style/matching.rs, components/layout/Cargo.toml, components/layout/lib.rs

@highfive
Copy link
Copy Markdown

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Dec 14, 2016
Copy link
Copy Markdown
Contributor

@mbrubeck mbrubeck left a comment

Choose a reason for hiding this comment

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

r=mbrubeck with some nits. (Could be fixed by just squashing into a single commit.)

@@ -0,0 +1,19 @@
[package]
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.

Nit: This addition is in the wrong commit.

@@ -0,0 +1,14 @@
[package]
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.

Nit: This addition is in the wrong commit.

@@ -0,0 +1,14 @@
[package]
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.

Nit: This addition is in the wrong commit.

@@ -1,13 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
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 deletion is in the wrong commit.

@asajeffrey
Copy link
Copy Markdown
Contributor Author

Squashed. @bors-servo: r=mbrubeck

@bors-servo
Copy link
Copy Markdown
Contributor

📌 Commit facca14 has been approved by mbrubeck

@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 Dec 14, 2016
@KiChjang
Copy link
Copy Markdown
Contributor

@bors-servo p=10

@bors-servo
Copy link
Copy Markdown
Contributor

⌛ Testing commit facca14 with merge 70219ae...

bors-servo pushed a commit that referenced this pull request Dec 14, 2016
Remove the util crate

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

This PR removes the `util` crate.

* Replaced the `spawn_named` and `clamp` functions by appropriate uses of `std::thread::Builder::spawn`, `std::cmp::min` and `std::cmp::max`.
* Moved `opts`, `prefs` and `resource_files` into a new `config` crate.
* Moved `remutex` and `geometry` into their own crates.

---
<!-- 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 do not require tests because they are refactorings

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

💔 Test failed - linux-dev

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Dec 14, 2016
@KiChjang
Copy link
Copy Markdown
Contributor

Unit tests imports need to be updated, I presume?

@asajeffrey
Copy link
Copy Markdown
Contributor Author

@KiChjang indeed, doing that right now. Ditto cef.

@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Dec 14, 2016
@asajeffrey
Copy link
Copy Markdown
Contributor Author

Updated unit tests and cef port. @bors-servo r=mbrubreck p=10

@bors-servo
Copy link
Copy Markdown
Contributor

📌 Commit caacb9b has been approved by mbrubreck

@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 Dec 14, 2016
@bors-servo
Copy link
Copy Markdown
Contributor

⌛ Testing commit caacb9b with merge e9a1129...

bors-servo pushed a commit that referenced this pull request Dec 14, 2016
Remove the util crate

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

This PR removes the `util` crate.

* Replaced the `spawn_named` and `clamp` functions by appropriate uses of `std::thread::Builder::spawn`, `std::cmp::min` and `std::cmp::max`.
* Moved `opts`, `prefs` and `resource_files` into a new `config` crate.
* Moved `remutex` and `geometry` into their own crates.

---
<!-- 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 do not require tests because they are refactorings

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

💔 Test failed - linux-dev

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Dec 14, 2016
@KiChjang
Copy link
Copy Markdown
Contributor

error: unused import
  --> /home/servo/buildbot/slave/linux-dev/build/target/geckolib/debug/build/style-584c140631e9c02b/out/properties.rs:31:5
   |
31 | use servo_config::prefs::PREFS;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
/home/servo/buildbot/slave/linux-dev/build/components/style/lib.rs:155:5: 155:58 note: in this expansion of include!
   |
note: lint level defined here
  --> /home/servo/buildbot/slave/linux-dev/build/components/style/lib.rs:30:9
   |
30 | #![deny(warnings)]
   |         ^^^^^^^^

@asajeffrey
Copy link
Copy Markdown
Contributor Author

Oh bah humbug, geckolib.

@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Dec 15, 2016
@asajeffrey
Copy link
Copy Markdown
Contributor Author

Fixed geckolib @bors-servo r=mbrubeck

@bors-servo
Copy link
Copy Markdown
Contributor

📌 Commit 9be4fd5 has been approved by mbrubeck

@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 Dec 15, 2016
@bors-servo
Copy link
Copy Markdown
Contributor

⌛ Testing commit 9be4fd5 with merge 4eb6538...

bors-servo pushed a commit that referenced this pull request Dec 15, 2016
Remove the util crate

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

This PR removes the `util` crate.

* Replaced the `spawn_named` and `clamp` functions by appropriate uses of `std::thread::Builder::spawn`, `std::cmp::min` and `std::cmp::max`.
* Moved `opts`, `prefs` and `resource_files` into a new `config` crate.
* Moved `remutex` and `geometry` into their own crates.

---
<!-- 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 do not require tests because they are refactorings

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

I-refactor No impact; the issue is one of maintainability or tidiness. Proposed solution requires refactoring.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants