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

Build geckolib with a stable Rust compiler #11815

Closed
7 tasks done
SimonSapin opened this issue Jun 21, 2016 · 2 comments · Fixed by #12319
Closed
7 tasks done

Build geckolib with a stable Rust compiler #11815

SimonSapin opened this issue Jun 21, 2016 · 2 comments · Fixed by #12319
Labels
A-stylo B-meta This issue tracks the status of multiple, related pieces of work

Comments

@SimonSapin SimonSapin added B-meta This issue tracks the status of multiple, related pieces of work A-stylo labels Jun 21, 2016
@SimonSapin
Copy link
Member Author

SimonSapin commented Jun 21, 2016

@bholley @heycam @emilio With the style crate almost there, the next step is ports/geckolib/gecko_bindings which uses:

#![feature(const_fn)]
#![feature(concat_idents)]
#![feature(type_macros)]

then ports/geckolib:

#![feature(as_unsafe_cell)]
#![feature(box_syntax)]
#![feature(custom_attribute)]
#![feature(custom_derive)]
#![feature(plugin)]

#![plugin(heapsize_plugin)]
#![plugin(plugins)]

@SimonSapin
Copy link
Member Author

#11816 now brings the above down to const_fn and as_unsafe_cell. (In addition to discriminant_value in the style crate.)

bors-servo pushed a commit that referenced this issue Jun 22, 2016
Make the style crate (almost) build with a stable compiler

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

The bulk of this is adding cargo features to make derived implementations of `heapsize` and `serde` traits optional.

"Almost" because `std::intrinsics::discriminant_value` is currently unstable and doesn’t have any stable replacement that I know of. For now, this PR conditionally replaces it with `unimplemented!()`.

r? @nox

---
<!-- 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 <s>fix</s> are part of #11815 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not <s>require tests</s> *have tests yet* because that requires #11806, but I still want to land this before it bitrots. (Tests should check that the build succeeds with a stable compiler.)

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11816)
<!-- Reviewable:end -->
bors-servo pushed a commit that referenced this issue Jun 22, 2016
Make the style crate (almost) build with a stable compiler

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

The bulk of this is adding cargo features to make derived implementations of `heapsize` and `serde` traits optional.

"Almost" because `std::intrinsics::discriminant_value` is currently unstable and doesn’t have any stable replacement that I know of. For now, this PR conditionally replaces it with `unimplemented!()`.

r? @nox

---
<!-- 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 <s>fix</s> are part of #11815 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not <s>require tests</s> *have tests yet* because that requires #11806, but I still want to land this before it bitrots. (Tests should check that the build succeeds with a stable compiler.)

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11816)
<!-- Reviewable:end -->
SimonSapin added a commit that referenced this issue Jun 22, 2016
This makes rust-bindgen not generate a bunch of methods that were not
used, including `const fn` ones.

This helps with #11815 since `const fn` is unstable.
bors-servo pushed a commit that referenced this issue Jun 22, 2016
Generate geckolib structs with -no-bitfield-methods

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

This makes rust-bindgen not generate a bunch of methods that were not used, including `const fn` ones.

This helps with #11815 since `const fn` is unstable.

(Note that running `regen_style_structs.sh` without changing it made a bunch of unrelated changes to `structs_*.rs`, probably because I had a different Gecko version. I first made a commit of that, then added `-no-bitfield-methods`, regenerated, made another commit, then removed the first commit with `git rebase -i master@{u}`.)

r? @emilio

---
<!-- 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 part of #11815 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require new tests because they’re only removing dead code.

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11827)
<!-- Reviewable:end -->
SimonSapin added a commit that referenced this issue Jun 23, 2016
This allows removing `#![feature(as_unsafe_cell)]` in geckolib
and make progress towards #11815.
SimonSapin added a commit that referenced this issue Jun 23, 2016
This allows removing `#![feature(as_unsafe_cell)]` in geckolib
and make progress towards #11815.
bors-servo pushed a commit that referenced this issue Jun 23, 2016
Use our copy of RefCell for style data

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

This allows removing `#![feature(as_unsafe_cell)]` in geckolib and make progress towards #11815.

---
<!-- 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 part of #11815.

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require new tests because they don’t introduce no functional changes.

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11835)
<!-- Reviewable:end -->
bors-servo pushed a commit that referenced this issue Jun 28, 2016
Replace usage of std::intrinsics::discriminant_value with `match`

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

Replace usage of `std::intrinsics::discriminant_value` with per-enum generated code that uses `match` expressions. The LLVM IR shows that this optimizes well in release mode.

---
<!-- 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 part of #11815.

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require new tests because they shouldn’t change any behavior.

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11884)
<!-- Reviewable:end -->
bors-servo pushed a commit that referenced this issue Jul 5, 2016
Make geckolib possible to build on stable Rust

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

More for #11815

r? @nox

---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because _____

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12263)
<!-- Reviewable:end -->
bors-servo pushed a commit that referenced this issue Jul 5, 2016
Make geckolib possible to build on stable Rust

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

More for #11815

r? @nox

---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because _____

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12263)
<!-- Reviewable:end -->
bors-servo pushed a commit that referenced this issue Jul 8, 2016
Use a stable compiler for build-geckolib

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

---
<!-- 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 #11815 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because CI already runs `./mach build-geckolib`

<!-- 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/12319)
<!-- Reviewable:end -->
bors-servo pushed a commit that referenced this issue Jul 8, 2016
Use a stable compiler for build-geckolib

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

---
<!-- 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 #11815 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because CI already runs `./mach build-geckolib`

<!-- 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/12319)
<!-- Reviewable:end -->
bors-servo pushed a commit that referenced this issue Jul 8, 2016
Use a stable compiler for build-geckolib

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

---
<!-- 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 #11815 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because CI already runs `./mach build-geckolib`

<!-- 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/12319)
<!-- Reviewable:end -->
bors-servo pushed a commit that referenced this issue Jul 8, 2016
Use a stable compiler for build-geckolib

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

---
<!-- 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 #11815 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because CI already runs `./mach build-geckolib`

<!-- 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/12319)
<!-- Reviewable:end -->
bors-servo pushed a commit that referenced this issue Jul 8, 2016
Use a stable compiler for build-geckolib

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

---
<!-- 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 #11815 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because CI already runs `./mach build-geckolib`

<!-- 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/12319)
<!-- Reviewable:end -->
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 1, 2019
…(from servo:stable-geckolib); r=nox

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

More for servo/servo#11815

r? nox

---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 3d557b6f25eb9dbd084cb53bbc9a9cf93bad825b

UltraBlame original commit: 0563b21dfecef0e2f3f04f56f4f108a5dcbe85ec
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 1, 2019
…(from servo:stable-geckolib); r=nox

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

More for servo/servo#11815

r? nox

---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 3d557b6f25eb9dbd084cb53bbc9a9cf93bad825b

UltraBlame original commit: 0563b21dfecef0e2f3f04f56f4f108a5dcbe85ec
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 1, 2019
…(from servo:stable-geckolib); r=nox

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

More for servo/servo#11815

r? nox

---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 3d557b6f25eb9dbd084cb53bbc9a9cf93bad825b

UltraBlame original commit: 0563b21dfecef0e2f3f04f56f4f108a5dcbe85ec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-stylo B-meta This issue tracks the status of multiple, related pieces of work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant