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

Prepare stylo crates for switching to the 2018 edition #22083

Merged
merged 5 commits into from Nov 10, 2018
Merged

Prepare stylo crates for switching to the 2018 edition #22083

merged 5 commits into from Nov 10, 2018

Conversation

@SimonSapin
Copy link
Member

SimonSapin commented Nov 1, 2018

This can land when Gecko requires Rust 1.30. This does not switch the crates yet because the new edition is not yet stable in 1.30.


This change is Reviewable

@SimonSapin
Copy link
Member Author

SimonSapin commented Nov 1, 2018

CC @emilio

@bors-servo
Copy link
Contributor

bors-servo commented Nov 5, 2018

The latest upstream changes (presumably #22111) made this pull request unmergeable. Please resolve the merge conflicts.

@SimonSapin
Copy link
Member Author

SimonSapin commented Nov 5, 2018

bors-servo added a commit that referenced this pull request Nov 5, 2018
Switch some crates to the 2018 edition

This is the subset of #22083 that doesn’t affect Gecko at all, so it isn’t blocked.

<!-- 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/22086)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this pull request Nov 5, 2018
Switch some crates to the 2018 edition

This is the subset of #22083 that doesn’t affect Gecko at all, so it isn’t blocked.

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

bors-servo commented Nov 5, 2018

The latest upstream changes (presumably #22099) made this pull request unmergeable. Please resolve the merge conflicts.

bors-servo added a commit that referenced this pull request Nov 6, 2018
Switch some crates to the 2018 edition

This is the subset of #22083 that doesn’t affect Gecko at all, so it isn’t blocked.

<!-- 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/22086)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this pull request Nov 6, 2018
Switch some crates to the 2018 edition

This is the subset of #22083 that doesn’t affect Gecko at all, so it isn’t blocked.

<!-- 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/22086)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this pull request Nov 6, 2018
Switch some crates to the 2018 edition

This is the subset of #22083 that doesn’t affect Gecko at all, so it isn’t blocked.

<!-- 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/22086)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this pull request Nov 6, 2018
Switch some crates to the 2018 edition

This is the subset of #22083 that doesn’t affect Gecko at all, so it isn’t blocked.

<!-- 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/22086)
<!-- Reviewable:end -->
@SimonSapin SimonSapin changed the title [Do not merge] Switch most crates to the 2018 edition [Do not merge] Prepare stylo crates for switching to the 2018 edition Nov 6, 2018
@bors-servo
Copy link
Contributor

bors-servo commented Nov 7, 2018

The latest upstream changes (presumably #22126) made this pull request unmergeable. Please resolve the merge conflicts.

@SimonSapin SimonSapin force-pushed the 2018 branch 2 times, most recently from 5f88a81 to fa45fc3 Nov 7, 2018
@bors-servo
Copy link
Contributor

bors-servo commented Nov 8, 2018

The latest upstream changes (presumably #22143) made this pull request unmergeable. Please resolve the merge conflicts.

@SimonSapin
Copy link
Member Author

SimonSapin commented Nov 9, 2018

I’ve verified that (cd components/style && cargo check --features gecko) works, after copying ../gecko/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/debug/build/style-*/out/gecko/* to components/style/gecko/generated/ and applying this diff:

diff --git a/components/style/Cargo.toml b/components/style/Cargo.toml
index 15e4175160..8e9cbaaf30 100644
--- a/components/style/Cargo.toml
+++ b/components/style/Cargo.toml
@@ -73,6 +73,7 @@ uluru = "0.3"
 unicode-bidi = "0.3"
 unicode-segmentation = "1.0"
 void = "1.0.2"
+nsstring = {path = "../../../gecko/servo/support/gecko/nsstring"}
 
 [build-dependencies]
 lazy_static = "1"
diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs
index 072b78cf37..3cd111b8ad 100644
--- a/components/style/properties/properties.mako.rs
+++ b/components/style/properties/properties.mako.rs
@@ -427,7 +427,7 @@ pub const NON_CUSTOM_PROPERTY_ID_COUNT: usize =
 #[allow(dead_code)]
 unsafe fn static_assert_nscsspropertyid() {
     % for i, property in enumerate(data.longhands + data.shorthands + data.all_aliases()):
-    std::mem::transmute::<[u8; ${i}], [u8; ${property.nscsspropertyid()} as usize]>([0; ${i}]); // ${property.name}
+//    std::mem::transmute::<[u8; ${i}], [u8; ${property.nscsspropertyid()} as usize]>([0; ${i}]); // ${property.name}
     % endfor
 }
 % endif
@emilio
Copy link
Member

emilio commented Nov 9, 2018

Huh, why does static_assert_nscsspropertyid no longer hold?

@SimonSapin
Copy link
Member Author

SimonSapin commented Nov 9, 2018

Honestly I’m not sure. Some other errors were files when I rebuilt gecko with the commit that had the same message as your last sync commit in servo, but these persisted. Could there be a difference between using --feature use_bindgen v.s. not?

There are 44 errors: https://gist.github.com/rust-play/fa2dcae2579e5daa6cd77a9f057836e4

The differences between expected and actual IDs are all either -8, -6, 4, 8, or 10: https://gist.github.com/rust-play/352434b01b59d3e34f610ddadace3f35, so it looks like the sorting is not the same.

@SimonSapin SimonSapin changed the title [Do not merge] Prepare stylo crates for switching to the 2018 edition Prepare stylo crates for switching to the 2018 edition Nov 9, 2018
@SimonSapin
Copy link
Member Author

SimonSapin commented Nov 10, 2018

@bors-servo r=emilio

@bors-servo
Copy link
Contributor

bors-servo commented Nov 10, 2018

📌 Commit c5d7294 has been approved by emilio

@SimonSapin
Copy link
Member Author

SimonSapin commented Nov 10, 2018

Added a commit to fix unrelated infra issue that was uncovered now because of a cache expiration.

@bors-servo r=emilio

@bors-servo
Copy link
Contributor

bors-servo commented Nov 10, 2018

💡 This pull request was already approved, no need to approve it again.

  • This pull request previously failed. You should add more commits to fix the bug, or use retry to trigger a build again.
  • There's another pull request that is currently being tested, blocking this pull request: #22165
@bors-servo
Copy link
Contributor

bors-servo commented Nov 10, 2018

📌 Commit c5d7294 has been approved by emilio

@bors-servo
Copy link
Contributor

bors-servo commented Nov 10, 2018

Testing commit c5d7294 with merge 7714615...

bors-servo added a commit that referenced this pull request Nov 10, 2018
Prepare stylo crates for switching to the 2018 edition

This can land when [Gecko requires Rust 1.30](https://bugzilla.mozilla.org/show_bug.cgi?id=1504031). This does not switch the crates yet because the new edition is not yet stable in 1.30.

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

SimonSapin commented Nov 10, 2018

@SimonSapin
Copy link
Member Author

SimonSapin commented Nov 10, 2018

@bors-servo r=emilio

@bors-servo
Copy link
Contributor

bors-servo commented Nov 10, 2018

📌 Commit b0d13cc has been approved by emilio

@bors-servo
Copy link
Contributor

bors-servo commented Nov 10, 2018

Testing commit b0d13cc with merge 3b1078b...

bors-servo added a commit that referenced this pull request Nov 10, 2018
Prepare stylo crates for switching to the 2018 edition

This can land when [Gecko requires Rust 1.30](https://bugzilla.mozilla.org/show_bug.cgi?id=1504031). This does not switch the crates yet because the new edition is not yet stable in 1.30.

<!-- 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/22083)
<!-- Reviewable:end -->
@bors-servo bors-servo merged commit b0d13cc into master Nov 10, 2018
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
@SimonSapin SimonSapin deleted the 2018 branch Nov 10, 2018
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

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