Closed Bug 1455722 Opened 6 years ago Closed 5 years ago

xpt files could be generated on every build


(Firefox Build System :: General, enhancement)

3 Branch
Not set


(firefox62 fixed)

Tracking Status
firefox62 --- fixed


(Reporter: chmanchester, Assigned: nika)




(1 file)

The use of `FileAvoidWrite` in 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.
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+
Assignee: nobody → nika
Pushed by
Don't use FileAvoidWrite for writing .xpt files. r=mccr8
Keywords: checkin-needed
Closed: 5 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.