Closed Bug 1443152 Opened 7 years ago Closed 7 years ago

Instructions to regenerate webrender_ffi_generated.h no longer work

Categories

(Core :: Graphics: WebRender, defect, P1)

Other Branch
defect

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: kats, Assigned: kats)

References

Details

(Whiteboard: [gfx-noted])

Attachments

(1 file)

As of bug 1381576 the cbindgen step documented at [1] no longer works. I have a PR at eqrion/cbindgen#142 to allow explicitly specifying where the lockfile is. Once that is published to crates.io I'll update the instructions. [1] https://searchfox.org/mozilla-central/rev/d2b4b40901c15614fad2fa34718eea428774306e/gfx/webrender_bindings/webrender_ffi_generated.h#11
Oh actually I'm going to add a static_assert to ensure size_t and uintptr_t are the same size. That's better than just ignoring the mismatch. It didn't look feasible to propagate that change to all the call sites.
Comment on attachment 8958212 [details] Bug 1443152 - Update to cbindgen 0.5.2. https://reviewboard.mozilla.org/r/227144/#review232960 ::: gfx/webrender_bindings/cbindgen.toml:8 (Diff revision 2) > * file, You can obtain one at http://mozilla.org/MPL/2.0/. */""" > autogen_warning = """/* DO NOT MODIFY THIS MANUALLY! This file was generated using cbindgen. > * To generate this file: > - * 1. Get the latest cbindgen using `cargo +nightly install --force cbindgen` > + * 1. Get the latest cbindgen using `cargo install --force cbindgen` > * a. Alternatively, you can clone `https://github.com/eqrion/cbindgen` and use a tagged release > - * 2. Run `rustup run nightly cbindgen toolkit/library/rust/ --crate webrender_bindings -o gfx/webrender_bindings/webrender_ffi_generated.h` > + * 2. Run `rustup run nightly cbindgen toolkit/library/rust/ --lockfile Cargo.lock --crate webrender_bindings -o gfx/webrender_bindings/webrender_ffi_generated.h` I think you can get rid of the `rustup run nightly` part as it should work on stable now.
Attachment #8958212 - Flags: review?(rhunt) → review+
cbindgen runs on stable, but fails on webrender_bindings when trying to parse euclid: kats@kgupta-pc test-mozilla-wr$ cbindgen toolkit/library/rust/ --lockfile Cargo.lock --crate webrender_bindings -o gfx/webrender_bindings/webrender_ffi_generated.h ERROR: Parsing crate `euclid`: couldn't run `cargo rustc --pretty=expanded`: Compile(" Compiling quote v0.3.15\n Compiling num-traits v0.1.41\n Compiling unicode-xid v0.0.4\n Compiling synom v0.11.2\n Compiling syn v0.11.11\n Compiling serde_derive_internals v0.19.0 (https://github.com/gankro/serde?branch=deserialize_from_enums4#93e24f26)\n Compiling serde_derive v1.0.27 (https://github.com/gankro/serde?branch=deserialize_from_enums4#93e24f26)\n Compiling serde v1.0.27\n Compiling euclid v0.17.2\nerror: the option `Z` is only accepted on the nightly compiler\n\nerror: Could not compile `euclid`.\n\nTo learn more, run the command again with --verbose.\n") ERROR: Couldn't generate bindings for toolkit/library/rust/. So we still need to run it with nightly.
I guess it's not euclid-specific, but just that it uses -Z unstable-options --pretty=expanded
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #6) > cbindgen runs on stable, but fails on webrender_bindings when trying to > parse euclid: > > kats@kgupta-pc test-mozilla-wr$ cbindgen toolkit/library/rust/ --lockfile > Cargo.lock --crate webrender_bindings -o > gfx/webrender_bindings/webrender_ffi_generated.h > ERROR: Parsing crate `euclid`: couldn't run `cargo rustc --pretty=expanded`: > Compile(" Compiling quote v0.3.15\n Compiling num-traits v0.1.41\n > Compiling unicode-xid v0.0.4\n Compiling synom v0.11.2\n Compiling syn > v0.11.11\n Compiling serde_derive_internals v0.19.0 > (https://github.com/gankro/serde?branch=deserialize_from_enums4#93e24f26)\n > Compiling serde_derive v1.0.27 > (https://github.com/gankro/serde?branch=deserialize_from_enums4#93e24f26)\n > Compiling serde v1.0.27\n Compiling euclid v0.17.2\nerror: the option `Z` > is only accepted on the nightly compiler\n\nerror: Could not compile > `euclid`.\n\nTo learn more, run the command again with --verbose.\n") > ERROR: Couldn't generate bindings for toolkit/library/rust/. > > So we still need to run it with nightly. Oh yes of course. Sorry my brain wanted to see something related to the nightly compile issues we were dealing with. That's unrelated.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: