Closed Bug 1455722 Opened 2 years ago Closed 2 years ago

xpt files could be generated on every build

Categories

(Firefox Build System :: General, enhancement)

3 Branch
enhancement
Not set

Tracking

(firefox62 fixed)

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: chmanchester, Assigned: Nika)

References

Details

Attachments

(1 file)

The use of `FileAvoidWrite` in xpidl-process.py from bug 1444745 means we don't bump the mtime of the .xpt file in a no-op build, so if you update something that is a dependency (a significant amount of python in the tree qualifies) they will all be built on every invocation of the build.
See Also: → 1455892
Duplicate of this bug: 1456380
If we are going to use the same solution as bug 1218999 (that bumps the mtime), we should probably just remove FileAvoidWrite because that makes it totally pointless (see bug 1454912).

I hope there can be a general solution where we can avoid both kinds of rebuilding... but that's probably non-trivial.
Seems like maybe we should just fix bug 1454912.
This adds 12 seconds to basically every build I do even when I haven't touched IDL files. Can we fix this?
Flags: needinfo?(nika)
(In reply to Dave Townsend [:mossop] from comment #4)
> This adds 12 seconds to basically every build I do even when I haven't
> touched IDL files. Can we fix this?

Ugh make.

I don't think there's any good way to fix this within our make build system. we need to update mtime which means that our best option is to just not use FileAvoidWrite for these files...

We could also take the approach of 1218999 and bump mtime but that feels unnecessary and has similar drawbacks. if/when we switch to a different backend we can perhaps improve this situation.
Flags: needinfo?(nika)
Unfortunately, FileAvoidWrite causes us to re-generate .xpt files every time we
build if a dependency of the .xpt files doesn't affect their output.

The easiest solution is to stop performing this option until we get a better
build backend like `tup` which can handle problems like this.
Attachment #8972164 - Flags: review?(continuation)
Attachment #8972164 - Flags: review?(continuation) → review+
Keywords: checkin-needed
Assignee: nobody → nika
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/44cb8693cb49
Don't use FileAvoidWrite for writing .xpt files. r=mccr8
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/44cb8693cb49
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
Version: Version 3 → 3 Branch
You need to log in before you can comment on or make changes to this bug.