Skip to content

Automated tool for catching imports of missing components

There are some upstream components where we exclude all the files from moz.build:

  • protections/
  • pocket/
  • firefoxview/
  • pingsender/
  • extensions/formautofill
  • extensions/webcompat
  • extensions/pictureinpicture
  • extensions/search-detection
  • extensions/newtab
  • pbproxy
  • newtab/ as of #43886 (closed).

If any of the files registered under these directories is (lazy) loaded, then it will cause a console error and potentially short-circuit some code we need.

Therefore, it would be generally useful to have some means of detecting when upstream adds new code that tries to load one of these missing components, rather than having to do this manually.

In particular, if we follow rapid release these problems will arise at different times.

I know of at least two upcoming upstream changes that will effect us:

@brizental do you know whether this is covered by a linter that takes moz.build into account? If not, is there a linter we could modify to do this?

Otherwise, should we create our own script?

/cc @pierov @morgan

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information