On Tue, Aug 7, 2018 at 11:32 AM, Boris Zbarsky <bzbar...@mit.edu> wrote:
> On 8/7/18 11:27 AM, Jonathan Watt wrote: > >> When I previously discussed that with mshal he said the following (edited >> to >> replace locations specific to my setup): >> >> "A little background about tup: by default it keeps track of everything >> in the >> directory where 'tup init' gets run, and all subdirectories >> > > Hmm. So if my objdirs are siblings of my srcdir, could I just run "tup > init" in the common parent? > > Being able to have objdirs outside the srcdir is pretty important in my > case; it makes it a lot easier to search code without having the objdir > interfere with the searches... Yes, that should work, though with a caveat - you'd probably want to make sure that the common parent is only used for one srcdir and objdir. So this works fine: mydir/mozilla-central mydir/objdir mydir/.tup So you would run 'tup init' manually in "mydir", and have a mozconfig like: mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../objdir ac_add_options --build-backends=Tup I've confirmed locally that this works, though you just get an innocuous warning when mozbuild tries to run 'tup init' inside the srcdir: "tup warning: database already exists in directory: .../mydir". We could improve support for this by trying to run 'tup init' automatically in the parent dir if the objdir is a sibling of the srcdir, which shouldn't be too hard to add. For comparison, the "default" case of an objdir inside the srcdir looks like this: mydir/mozilla-central mydir/mozilla-central/objdir mydir/mozilla-central/.tup Without a file monitor, tup scans everything under where ".tup" exists, so all of "mydir" in the first example and "mydir/mozilla-central" in the default case. The caveat applies in what I think jwatt's case is (jwatt, correct me if I'm wrong - I may have misunderstood your setup) where you have multiple trees and objdirs all as siblings. For example: mydir/mozilla-central mydir/mozilla-inbound mydir/mozilla-beta mydir/objdir-central-debug mydir/objdir-central-opt mydir/objdir-inbound-debug mydir/objdir-inbound-opt ... mydir/.tup In this case, since we don't have the file monitor integrated yet, the initial scan would likely take way too long and you'd lose much of the benefit of switching backends in the first place. I think we could support this structure in the future, but it would require some changes in tup itself, and is likely not a quick fix. So if you already have the srcdir/objdir pairs in an isolated parent, you should be good to go now with a manual 'tup init' in the parent, and we can support that workflow fairly easily. If it's the latter case where many trees are in a single common root, I don't have a good solution for that at the moment. -Mike
_______________________________________________ dev-builds mailing list dev-builds@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-builds