Closed Bug 1304131 Opened 7 years ago Closed 7 years ago
.py GENERATED _FILES invocation creates xpidllex .py incorrectly
58 bytes, text/x-review-board-request
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 firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/aebd668e01d0 list xpidl.stub as the first output for header.py; r=gps
You need to log in before you can comment on or make changes to this bug.