Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up`worker_id` type changed to uuid #25211
Conversation
highfive
commented
Dec 8, 2019
|
Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @paulrouget (or someone else) soon. |
highfive
commented
Dec 8, 2019
|
Heads up! This PR modifies the following files:
|
highfive
commented
Dec 8, 2019
| #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, MallocSizeOf, PartialEq, Serialize)] | ||
| pub struct WorkerId(pub u32); | ||
| #[derive(Clone, Debug, Deserialize, Eq, Hash, MallocSizeOf, PartialEq, Serialize)] | ||
| pub struct WorkerId(pub String); |
This comment has been minimized.
This comment has been minimized.
paulrouget
Dec 9, 2019
Contributor
You can keep uuid and implement malloc_size_of, or maybe use u128 (https://docs.rs/uuid/0.8.1/uuid/struct.Uuid.html#method.to_u128_le).
| @@ -94,7 +95,7 @@ impl Drop for AutoCloseWorker { | |||
| pub struct GlobalScope { | |||
| eventtarget: EventTarget, | |||
| crypto: MutNullableDom<Crypto>, | |||
| next_worker_id: Cell<WorkerId>, | |||
| next_worker_id: WorkerId, | |||
This comment has been minimized.
This comment has been minimized.
paulrouget
Dec 9, 2019
Contributor
I don't think that field is necessary anymore. Just create a new uuid when necessary.
|
Ok. I'll start working on these changes. |
I don't know. @jdm ? |
|
Yes, that's fine. |
|
I have changed |
| @@ -47,3 +47,4 @@ url = { version = "2.0", optional = true } | |||
| webrender_api = { git = "https://github.com/servo/webrender", optional = true } | |||
| xml5ever = { version = "0.16", optional = true } | |||
| void = "1.0.2" | |||
| uuid = {version = "0.8", features = ["v4", "serde"]} | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
kunalmohan
Dec 11, 2019
Author
Collaborator
I have removed serde here and made the other changes too.
|
@bors-servo r+ |
|
|
`worker_id` type changed to uuid <!-- Please describe your changes on the following line: --> Fixes #6631 `worker_id` is now generate as uuid and saved as string. --- <!-- 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 #6631 (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- 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. -->
|
|
|
@bors-servo retry |
`worker_id` type changed to uuid <!-- Please describe your changes on the following line: --> Fixes #6631 `worker_id` is now generate as uuid and saved as string. --- <!-- 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 #6631 (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- 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. -->
|
@bors-servo retry |
`worker_id` type changed to uuid <!-- Please describe your changes on the following line: --> Fixes #6631 `worker_id` is now generate as uuid and saved as string. --- <!-- 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 #6631 (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- 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. -->
|
|
|
@bors-servo retry |
`worker_id` type changed to uuid <!-- Please describe your changes on the following line: --> Fixes #6631 `worker_id` is now generate as uuid and saved as string. --- <!-- 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 #6631 (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- 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. -->
|
|
kunalmohan commentedDec 8, 2019
Fixes #6631
worker_idis now generate as uuid and saved as string../mach build -ddoes not report any errors./mach test-tidydoes not report any errors