header.py GENERATED_FILES invocation creates xpidllex.py incorrectly

RESOLVED FIXED in Firefox 52

Status

defect
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: mshal, Assigned: mshal)

Tracking

unspecified
mozilla52
Dependency tree / graph

Firefox Tracking Flags

(firefox52 fixed)

Details

Attachments

(1 attachment)

Apparently I goofed this up in bug 1253431. The first file passed to the py_action (xpidllex.py) is opened as a FileAvoidWrite in file_generate.py, but the other-licenses/ply/ code doesn't use this file handle, and instead opens its own. The contents of the actual file are overidden by our unused FileAvoidWrite handle, meaning xpidllex.py is actually a 0-length file from the header.py invocation. The XPIDL generation code is tolerant to this though, so the first .xpt file that is generated will re-create a new xpidllex.py that can then be reused.

I think an easy fix here is to declare an 'xpidl.stub' file as the first file, so our py_action can use this as the FileAvoidWrite file (and xpidl.stub.pp as the deps file).

However, we should probably give some more thought to how we want to handle multiple outputs in GENERATED_FILES in another bug. I added some preliminary support for it in bug 1261283, but that was mostly to get the dependencies represented in the Makefile, rather than how the py_action is invoked. It is a little awkward at present that the first output is passed in as a FileAvoidWrite handle, while outputs [2..N] aren't passed in at all and are just expected to be written by the action.
Comment on attachment 8793016 [details]
Bug 1304131 - list xpidl.stub as the first output for header.py;

https://reviewboard.mozilla.org/r/79834/#review79164
Attachment #8793016 - Flags: review?(gps) → review+
Pushed by mshal@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/aebd668e01d0
list xpidl.stub as the first output for header.py; r=gps
https://hg.mozilla.org/mozilla-central/rev/aebd668e01d0
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.