gecko-dev/python
Nick Alexander 4161679514 Bug 1368699 - Write .purgecaches sentinels every |mach build|. r=gps
This adds a new `post_build` step to each `BuildBackend`
implementation, and uses it to write .purgecaches after every |mach
build| invocation -- including after |mach build TARGET| invocations.
This approach should be more robust than the existing recursive-Make
based solution, which seems to not write the .purgecaches files in
some situations.

In addition, the recursive-Make solution does not generalize to other
backends, in particular Tup.  It is possible that the Tup backend will
handle writing the .purgecaches sentinel as part of its regular build
process, but discussions with mshal suggest that there's no convenient
way for Tup to write .purgecaches only when something *changes* during
the build.  That is, Tup can achieve the behaviour implemented by this
patch, but it's not easier to do better by not writing .purgecaches
when the caches do not in fact need to be purged.

I elected to bake in the special knowledge of
--enable-application=browser and macOS here since this whole process
is special.  If we need to generalize, we could add a moz.configure
option specifying the purgecaches directories, but it doesn't seem
worth it right now.

The ideal approach would be to determine FINAL_TARGET from the
application directory, but that is determined by DIST_SUBDIR.  In
addition, it's not clear how to present that information to the
post-build step in a build-backend agnostic manner.

This will require tweaking as we migrate the macOS bundle handling to
moz.build, especially in browser/app.  See
https://bugzilla.mozilla.org/show_bug.cgi?id=1223748, which could
improve this significantly.

MozReview-Commit-ID: 63KZy18D23i

--HG--
extra : rebase_source : e973d065cd91e965f4103ed2732858e2e7a9c546
2018-01-31 09:25:12 -08:00
..
devtools/migrate-l10n Bug 1346025 - Move vendored python modules from /python to /third_party/python, r=ted 2017-05-25 11:48:03 -04:00
l10n/fluent_migrations Bug 1411012 - Migrate a small chunk of Privacy pane in Preferences to Fluent. r=mshal,Pike 2017-11-09 12:11:32 -08:00
mach Bug 1415614 - Add an API to log all structured messages; r=mshal 2017-11-09 15:09:52 -08:00
mozboot Bug 1432892 - Comment the npm package dependency until Debian brings it back r=standard8 2018-01-26 13:53:19 +01:00
mozbuild Bug 1368699 - Write .purgecaches sentinels every |mach build|. r=gps 2018-01-31 09:25:12 -08:00
mozlint Bug 1433912 - [lint] Only run codespell linter on python/mozlint and tools/lint for now, r=sylvestre 2018-01-29 10:25:54 -05:00
mozterm Backed out 5 changesets (bug 1421799) for failing firefox ui functional tests. r=backout on a CLOSED TREE 2018-01-03 20:21:28 +02:00
mozversioncontrol Bug 1405588 - [mozversioncontrol] Use base_ref instead of upstream as default outgoing comparison on git, r=gps 2017-11-01 12:57:03 -04:00
mach_commands.py Bug 1403012 - Fix TypeError when running python unittests via |mach test|, r=gbrown 2018-01-12 11:22:58 -05:00
moz.build Bug 1433974 - Update BUG_COMPONENT for some of the new Testing components, r=jmaher 2018-01-29 12:57:54 -05:00
README Bug 1346025 - Move vendored python modules from /python to /third_party/python, r=ted 2017-05-25 11:48:03 -04:00

This directory contains common Python code.

The basic rule is that if Python code is cross-module (that's "module" in the
Mozilla meaning - as in "module ownership") and is MPL-compatible, it should
go here.

What should not go here:

* Vendored python modules (use third_party/python instead)
* Python that is not MPL-compatible (see other-licenses/)
* Python that has good reason to remain close to its "owning" (Mozilla)
  module (e.g. it is only being consumed from there).

Historical information can be found at
https://bugzilla.mozilla.org/show_bug.cgi?id=775243
https://bugzilla.mozilla.org/show_bug.cgi?id=1346025