Skip to content

Prepare stylo crates for switching to the 2018 edition - #22083

Merged
bors-servo merged 5 commits into
masterfrom
2018
Nov 10, 2018
Merged

bors-servo merged 5 commits into
masterfrom
2018

Conversation

@SimonSapin

@SimonSapin SimonSapin commented Nov 1, 2018 •

Copy link
Copy Markdown
Member

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

CC @emilio

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Nov 1, 2018
@bors-servo

Copy link
Copy Markdown
Contributor

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

@highfive highfive added the S-needs-rebase There are merge conflict errors. label Nov 5, 2018
@SimonSapin

Copy link
Copy Markdown
Member Author

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

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

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

☔ 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 Compare November 7, 2018 17:31
@bors-servo

Copy link
Copy Markdown
Contributor

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

@SimonSapin

Copy link
Copy Markdown
Member Author

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

emilio commented Nov 9, 2018

Copy link
Copy Markdown
Member

Huh, why does static_assert_nscsspropertyid no longer hold?

@SimonSapin

Copy link
Copy Markdown
Member Author

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

@bors-servo r=emilio

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit c5d7294 has been approved by emilio

@highfive highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Nov 10, 2018
@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 Nov 10, 2018
@SimonSapin

Copy link
Copy Markdown
Member Author

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

💡 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: Enable old glyph assertion #22165

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit c5d7294 has been approved by emilio

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Nov 10, 2018
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit c5d7294 with merge 7714615...

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

@bors-servo r-

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

Copy link
Copy Markdown
Member Author

@bors-servo r=emilio

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit b0d13cc has been approved by emilio

@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 10, 2018
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit b0d13cc with merge 3b1078b...

bors-servo pushed 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

Copy link
Copy Markdown
Contributor

@bors-servo
bors-servo merged commit b0d13cc into master Nov 10, 2018
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Nov 10, 2018
@SimonSapin
SimonSapin deleted the 2018 branch November 10, 2018 23:07
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.

4 participants