----- Original Message -----
> Often my workflow looks something like this:
> 
> change files in directory D
> rebuild only D, get a list of errors to fix
> ...iterate until no more errors
> try to rebuild a few related directories, fixing errors there
> then rebuild the entire tree, hopefully without errors
> 
> Often the changes to directory D are to header files that are included all
> over the tree. If I could only do full rebuilds, I would have to wait for a
> bunch of unrelated files to compile before I could see if the directory I'm
> interested in works. Then, if fixing an error required making a change to
> one of the header files again, I would have to wait for a ton of files to
> recompile again. A process that would have taken 20 minutes could be drawn
> out into an hour.
> 
> This happens really often when changing the JS engine or xpconnect, since
> files like jsapi.h, jsfriendapi.h, and xpcpublic.h are included almost
> everywhere.

Strawman idea: add support for:

  mach check-syntax <directory>...

which runs the compiler with -fsyntax-only (GCCish) or /Zs (MSVC) on the source 
files in the given directory(ies).  This sort of thing should be fairly 
straightforward, given that we already support something similar for generating 
preprocessed files in a given directory.  Then you get to keep the fast 
workflow, the build folks get to ignore single-directory rebuilds, and 
everybody winds up happy--well, as soon as people adjust to typing new commands 
for their workflow, of course...

(This obviously doesn't address linking errors, but AIUI, the workflow above 
isn't about linking errors, but build errors.)

-Nathan
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to