Closed Bug 1484915 Opened 6 years ago Closed 5 years ago

don't clear out ServoStyleConsts.h on cbindgen failure

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla66
Tracking Status
firefox66 --- fixed

People

(Reporter: heycam, Assigned: emilio)

Details

Attachments

(1 file)

If we avoid clearing out ServoStyleConsts.h when cbindgen fails, it might help unblock subsequent compilation of the style crate.  In cases where a syntax error in the style crate is what caused cbindgen to fail, this will help point to where the problem is.
Ya. After bumping the version of cbindgen, I also see this problem. :(
Flags: needinfo?(emilio)
FWIW, the newer version of cbindgen probably should point out to a file where the error is exposed and to a solution to get the error (`rustc -Z parse-only <foo>`), so this should be better.

Ted, do you know if there is an easy way to do this? If not, maybe failing hard when cbindgen fails is worth it, do you know whats the best way to do that? Just throwing when cbindgen failed instead of  printing?
Flags: needinfo?(emilio) → needinfo?(ted)
To clarify: the problem here is that cbindgen fails, but it doesn't produce a good enough error message, so it's hard to figure out what failed? And in some cases you'd be happier just seeing what rustc has to say about that crate?

I don't think there's a good way to make the build system do this unfortunately. If you can make cbindgen produce better error messages that sounds like the right thing to do.
Flags: needinfo?(ted)
I think this should do. This still prints out stderr when it fails pointing to
the solution, and doesn't fail the build.
Assignee: nobody → emilio
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/599de612de7f
Throw instead of keep going if cbindgen fails. r=boris
https://hg.mozilla.org/mozilla-central/rev/599de612de7f
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: