Closed Bug 293485 Opened 20 years ago Closed 19 years ago

Changing an IDL file does not rebuild IDLs that include it (IDL dependencies)

Categories

(Firefox Build System :: General, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bugzilla-mozilla-20000923, Assigned: neil)

Details

Attachments

(4 files, 1 obsolete file)

Many IDL files include others, but no provision is made for this in the
rebuilding of XPTs and Hs. If an IDL file is changed, and another includes it,
the XPT for the second interface will continue to reference the old UUID of the
first, which then promptly breaks when it is used.

I have a new Perl script that checks this dependency tree, and makes XPTs and Hs
rebuild when anything they use changes.
I'm attaching this first, so people can see just what it does and
agree/disagree with the method it takes. The basic idea is to store a cache of
the mtime of all the files used to make an XPT/H, and only rebuild if there is
a change in at least one item.

There are also some tweaks to rules.mk to call this script and rebuild only for
certain return values.
Attached patch rules.mk changesSplinter Review
Just for completeness, here is my changes to rules.mk to support the Perl
script.
* Adds -d option to xpidl to generate .pp output
* Tells rules.mk that .idl files generate .pp files
I tried it on xpfe/components/search/public and it seems ok, so...
OK, so it doesn't break my build.
But I suppose the real test is to change some .idl file and see what happens.
Attachment #183489 - Flags: review?(benjamin)
Comment on attachment 183489 [details] [diff] [review]
xpidl dependency hack that I'll trial tonight

I don't think I understand the IDLS bits in rules.mk... why use a wildcard
instead of XPIDLSRCS?
Comment on attachment 183489 [details] [diff] [review]
xpidl dependency hack that I'll trial tonight

other than IDLS = $(strip $(wildcard *.idl)) this looks great! Why can't we use
IDLS = $(XPIDLSRCS) $(SDK_XPIDLSCRCS) or something like that?
Attachment #183489 - Flags: review?(benjamin) → review-
Assignee: nobody → neil.parkwaycc.co.uk
Attachment #183489 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #206658 - Flags: superreview?(shaver)
Attachment #206658 - Flags: review?(benjamin)
Attachment #206658 - Flags: review?(benjamin) → review+
biesi pointed out that the .h files don't matter as it's the .cpp files that need to track dependency information. This allows me to trim the patch a little.
Attached patch Trimmed patchSplinter Review
Attachment #207081 - Flags: superreview?(shaver)
Attachment #207081 - Flags: review?(benjamin)
Attachment #207081 - Flags: review?(benjamin) → review+
Comment on attachment 207081 [details] [diff] [review]
Trimmed patch

sr=shaver
Attachment #207081 - Flags: superreview?(shaver) → superreview+
Comment on attachment 206658 [details] [diff] [review]
improved patch and addressed review comments

cancelling outdated (I think, though the patch isn't obsoleted) sr request
Attachment #206658 - Flags: superreview?(shaver)
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
I presume this leaks if someone does: -d foo -d bar :)
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: