Closed Bug 1400084 Opened 8 years ago Closed 8 years ago

stylo: Stop generating two structs.rs files and probably merge structs.rs and bindings.rs

Categories

(Core :: CSS Parsing and Computation, enhancement, P4)

enhancement

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox57 --- wontfix
firefox58 --- fixed

People

(Reporter: xidorn, Assigned: xidorn)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

41 bytes, text/x-github-pull-request
Details | Review
Currently, we always generate two structs.rs files, one for release, the other for debug, regardless build type we are actually doing. This is mainly because we need to check in the generated files into Servo tree, and run stylo tests there for both release and debug modes. If we only generate one structs.rs for the current build, people would need to do some extra manual work for updating the in-tree files. (Download the generated files from two or four builds and rename the files accordingly) Since those in-tree files were updated frequently in the early time of development, I thought it's worth paying some extra build time for the productivity. Although the build time shouldn't be too terrible in general (because structs_{debug,release}.rs and bindings.rs are generated in parallel), we may still want to avoid unnecessary machine time. I think, after we start running the struct layout tests on Gecko's automation in bug 1373878, we can stop running the same tests on Servo CI (because those files can only changes from Gecko change, and they only matter when we link things with Gecko). And once we stop running the tests on Servo CI, we can just keep one structs.rs in Servo tree. We can probably even do better: just merge bindings.rs and structs.rs. I don't see any reason we cannot do that other than needing two structs.rs files. If we can merge the two files, the build time needed for bindgen should be further reduced, since we wouldn't be parsing the headers multiple times any more.
Assignee: nobody → xidorn+moz
Attached file Servo PR
So it's a bit more complicated than I thought. Servo CI builds both release mode and debug mode of geckolib. I guess the main reason of doing so is that we can avoid some cases which bust autoland, so that we can backout fewer servo prs. But I'm not sure whether it's worth. I mean, there isn't a big difference between debug build and release build, so a green build of one should rarely bust the other. There are cases that can happen, though. I believe majority of people are using debug mode locally for development, so I guess if we do release build on Servo CI, it should generally be enough.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Blocks: 1412441
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: