Closed
Bug 11199
Opened 25 years ago
Closed 25 years ago
xpidl should remove output file on failure
Categories
(Core :: XPCOM, defect, P3)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
M13
People
(Reporter: mike+mozilla, Assigned: beard)
Details
Currently, some kinds of compilation failure have xpidl returning false, but leaving a half-constructed output file. This could be confusing.
Reporter | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Target Milestone: M12
Reporter | ||
Comment 1•25 years ago
|
||
Marking as assigned.
Reporter | ||
Comment 2•25 years ago
|
||
This is a problem because if there's an .idl file for which xpidl fails for some late-detected error, a truncated .h file still gets generated... and a subsequent make in the same directory will succeed. A pain when developing. Fix in hand for unix and (I believe) win32. I found NSPR code in macio.c:_MD_Delete to delete a file, but it's scary. Patrick, any suggestions? Is this even a problem on the mac?
Updated•25 years ago
|
Target Milestone: M12 → M13
Comment 3•25 years ago
|
||
lets get this done in m13
Assignee | ||
Comment 4•25 years ago
|
||
If you do remove objects on the Mac, the IDE goes ahead and deletes the output files. I can add code to the drop-in compiler to delete as well, since I know which file is the output file.
Reporter | ||
Updated•25 years ago
|
Assignee: mccabe → beard
Status: ASSIGNED → NEW
Reporter | ||
Comment 5•25 years ago
|
||
Fix checked in for Unix and Windows; punted on the Mac. Patrick, can you take this? Closing it and also punting is also an option.
Assignee | ||
Updated•25 years ago
|
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 6•25 years ago
|
||
Checked in a fix for this. Let me know if it works. I need some kind of file with an error in it that demonstrates the bug.
Reporter | ||
Comment 7•25 years ago
|
||
Removing the output file when xpidl returns an error should do the trick. Thanks for fixing this! This problem cropped up when error s were detected at output-generation time (after parsing.) An example problem is marking an interface as scriptable when it contains non-scriptable methods, such as methods with native return types. Previous to this fix, if you compiled such a file with the make system, you'd get an error (and an aborted make) the first time you compiled the file, but on the second time, the make system would detect a partial file with a correct timestamp, and wouldn't try to recompile the file.
You need to log in
before you can comment on or make changes to this bug.
Description
•