Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Have you run 'mach bootstrap' lately?

122 views
Skip to first unread message

Geoffrey Brown

unread,
May 11, 2017, 11:08:50 PM5/11/17
to dev-platform
If you set up your build environment with 'mach bootstrap' but haven't run
it recently, consider taking a few minutes now to run it again. Running
'mach bootstrap' from time to time will keep your environment up to date
and (more-or-less) in sync with your colleagues'.

This seems to be especially important for Android test environments: The
Android SDK and associated tools are always being updated and if you don't
stay up to date, there's a good chance something will eventually break.

Ryan VanderMeulen

unread,
May 12, 2017, 10:29:22 AM5/12/17
to
As a quick follow-on to that, running |./mach mercurial-setup
--update-only| from time to time is also a good idea. It'll keep your
clone of the version-control-tools repo up to date, which will in turn
ensure that the various Mercurial extensions we use stay up to date.

And while we're on that topic, I'll also remind people once again that
for Windows MozillaBuild users, you can keep your copy of Mercurial up
to date via pip! Simply run |pip install -U mercurial| and you'll have
the latest version available - no need to wait for an updated
MozillaBuild release.

Thanks,
Ryan

Sylvestre Ledru

unread,
May 12, 2017, 10:45:16 AM5/12/17
to Geoffrey Brown, dev-platform


Le 12/05/2017 à 05:08, Geoffrey Brown a écrit :
> If you set up your build environment with 'mach bootstrap' but haven't run
> it recently, consider taking a few minutes now to run it again. Running
> 'mach bootstrap' from time to time will keep your environment up to date
> and (more-or-less) in sync with your colleagues'.
>
> This seems to be especially important for Android test environments: The
> Android SDK and associated tools are always being updated and if you don't
> stay up to date, there's a good chance something will eventually break.
>
Would it be possible to add a check like:
"You haven't updated your local configuration since XX days, please
consider running
mach bootstrap ?"

Thanks,
Sylvestre

Ethan Glasser-Camp

unread,
May 12, 2017, 11:00:58 AM5/12/17
to Geoffrey Brown, dev-platform
Is there a way to run it without having to reanswer the configuration
questions?

Ethan

On Thu, May 11, 2017 at 11:08 PM, Geoffrey Brown <gbr...@mozilla.com> wrote:

> If you set up your build environment with 'mach bootstrap' but haven't run
> it recently, consider taking a few minutes now to run it again. Running
> 'mach bootstrap' from time to time will keep your environment up to date
> and (more-or-less) in sync with your colleagues'.
>
> This seems to be especially important for Android test environments: The
> Android SDK and associated tools are always being updated and if you don't
> stay up to date, there's a good chance something will eventually break.
> _______________________________________________
> dev-platform mailing list
> dev-pl...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>

Geoffrey Brown

unread,
May 12, 2017, 12:03:00 PM5/12/17
to Sylvestre Ledru, dev-platform
Good idea - I filed bug 1364480.

On Fri, May 12, 2017 at 8:45 AM, Sylvestre Ledru <sle...@mozilla.com> wrote:

>
>
> Le 12/05/2017 à 05:08, Geoffrey Brown a écrit :
> > If you set up your build environment with 'mach bootstrap' but haven't
> run
> > it recently, consider taking a few minutes now to run it again. Running
> > 'mach bootstrap' from time to time will keep your environment up to date
> > and (more-or-less) in sync with your colleagues'.
> >
> > This seems to be especially important for Android test environments: The
> > Android SDK and associated tools are always being updated and if you
> don't
> > stay up to date, there's a good chance something will eventually break.
> >

Geoffrey Brown

unread,
May 12, 2017, 1:04:57 PM5/12/17
to Ethan Glasser-Camp, dev-platform
I'm not sure. I always just answer the prompts and am happy with that.

There is a --settings option, which sounds like it might be helpful, but I
don't have any experience with that.

- Geoff

Ted Mielczarek

unread,
May 12, 2017, 2:35:26 PM5/12/17
to Sylvestre Ledru, dev-platform
On Fri, May 12, 2017, at 10:45 AM, Sylvestre Ledru wrote:
> Would it be possible to add a check like:
> "You haven't updated your local configuration since XX days, please
> consider running
> mach bootstrap ?"

We've had mach produce nag messages like that in the past and they have
been universally disliked, FWIW.

-Ted

Andrew McCreight

unread,
May 12, 2017, 3:01:01 PM5/12/17
to dev-platform
Obviously it has less users, but moz-git-tools has a similar thing and I
find it handy and nobody has complained about it, AFAIK.

Andrew


> -Ted

Botond Ballo

unread,
May 12, 2017, 3:11:37 PM5/12/17
to Andrew McCreight, dev-platform
On Fri, May 12, 2017 at 3:00 PM, Andrew McCreight
<amccr...@mozilla.com> wrote:
> On Fri, May 12, 2017 at 11:34 AM, Ted Mielczarek <t...@mielczarek.org> wrote:
>
>> On Fri, May 12, 2017, at 10:45 AM, Sylvestre Ledru wrote:
>> > Would it be possible to add a check like:
>> > "You haven't updated your local configuration since XX days, please
>> > consider running
>> > mach bootstrap ?"
>>
>> We've had mach produce nag messages like that in the past and they have
>> been universally disliked, FWIW.
>>
>
> Obviously it has less users, but moz-git-tools has a similar thing and I
> find it handy and nobody has complained about it, AFAIK.
> https://lists.mozilla.org/listinfo/dev-platform

Also, the previous nag message actually prevented you from proceeding
to |mach build| unless you employed an obscure bypass. I think that's
what people were most annoyed about, and would look upon an optional
reminder more favourably.

Cheers,
Botond

Eric Rahm

unread,
May 12, 2017, 3:23:57 PM5/12/17
to Ted Mielczarek, dev-platform, Sylvestre Ledru
Didn't it somehow cause builds to fail? A gentle reminder is probably fine.
TBH I'd be fine if it auto-updated but maybe I'm in the minority.

On Fri, May 12, 2017 at 11:34 AM, Ted Mielczarek <t...@mielczarek.org> wrote:

> On Fri, May 12, 2017, at 10:45 AM, Sylvestre Ledru wrote:
> > Would it be possible to add a check like:
> > "You haven't updated your local configuration since XX days, please
> > consider running
> > mach bootstrap ?"
>
> We've had mach produce nag messages like that in the past and they have
> been universally disliked, FWIW.
>

Aaron Klotz

unread,
May 12, 2017, 5:37:18 PM5/12/17
to dev-pl...@lists.mozilla.org
On 5/12/2017 8:29 AM, Ryan VanderMeulen wrote:
> And while we're on that topic, I'll also remind people once again that
> for Windows MozillaBuild users, you can keep your copy of Mercurial up
> to date via pip! Simply run |pip install -U mercurial| and you'll have
> the latest version available - no need to wait for an updated
> MozillaBuild release.
>

Isn't that something that mach bootstrap should be doing?

Gregory Szorc

unread,
May 12, 2017, 6:17:32 PM5/12/17
to Aaron Klotz, dev-platform
On Fri, May 12, 2017 at 2:37 PM, Aaron Klotz <akl...@mozilla.com> wrote:

> On 5/12/2017 8:29 AM, Ryan VanderMeulen wrote:
>
>> And while we're on that topic, I'll also remind people once again that
>> for Windows MozillaBuild users, you can keep your copy of Mercurial up to
>> date via pip! Simply run |pip install -U mercurial| and you'll have the
>> latest version available - no need to wait for an updated MozillaBuild
>> release.
>>
>>
> Isn't that something that mach bootstrap should be doing?
>

Yes. A patch is in Ryan's review queue to do this.

Dustin Mitchell

unread,
May 12, 2017, 6:59:31 PM5/12/17
to Eric Rahm, dev-platform, Ted Mielczarek, Sylvestre Ledru
Yep, this caused problems in automation (we ended up setting
I_PREFER_A_SUBOPTIMAL_MERCURIAL_EXPERIENCE_THANK_YOu or whatever the
env var was). I agree that a quick warn-and-continue would be fine.

Dustin

Ehsan Akhgari

unread,
May 12, 2017, 9:48:16 PM5/12/17
to dev-pl...@lists.mozilla.org
On 05/12/2017 06:59 PM, Dustin Mitchell wrote:
> Yep, this caused problems in automation (we ended up setting
> I_PREFER_A_SUBOPTIMAL_MERCURIAL_EXPERIENCE_THANK_YOu or whatever the
> env var was). I agree that a quick warn-and-continue would be fine.
Especially for git users. ;-)

Speaking of nagging that can be off putting, I have to admit I almost
never run mach bootstrap because it forces me make a decision about how
I want mercurial to be updated which I don't use. The only times I run
mach bootstrap are on fresh installs of OSes and past that, I stick to
manually updating my tools when things that depend on them break.

Ryan VanderMeulen

unread,
May 15, 2017, 12:24:44 PM5/15/17
to
On 5/12/17 6:16 PM, Gregory Szorc wrote:

>> Isn't that something that mach bootstrap should be doing?
>>
>
> Yes. A patch is in Ryan's review queue to do this.

Said patch is now merged to mozilla-central! :-)

-Ryan

Ethan Glasser-Camp

unread,
May 15, 2017, 6:40:12 PM5/15/17
to Geoffrey Brown, dev-platform
Actually, I think my real question is "What is the intended way for
developers to keep their development environment up-to-date?" I don't think
that way should require a developer to answer questions, because the
answers presumably haven't changed since the last time they answered them.
If the intended way is `mach bootstrap`, then I think `mach bootstrap`
should have an option to skip the questions[*]. If `mach bootstrap` is only
intended to run once when setting up a new development environment, then
maybe there should be a `mach tune-up` command or something like that.

I'm happy to file bugs for whichever is the case, but I'm not sure which
one it is.

Ethan

[*] When using `./mach bootstrap --settings ./mozconfig`, I get: `The
bootstrap command does not accept the arguments: --settings ./mozconfig`.
When using `./mach --settings ./mozconfig bootstrap`, I get the questions.

Ralph Giles

unread,
May 15, 2017, 7:59:15 PM5/15/17
to Ethan Glasser-Camp, Geoffrey Brown, dev-platform
The stand-alone bootstrap.py script actually has a --no-interactive
option (which answers 'yes' to everything) but the mach wrapper
doesn't support this.

`mach mercurial-setup` takes an --update-only option. Maybe we
implementing something like that for `mach boostrap` would help. Or
calling it something more descriptive like `mach update-deps`. Like
mercurial-setup, it could still use the bootstrap python module to
install things. While the two use cases are different, it makes sense
to share code between an initial development environment setup script
and one that updates that environment.

-r

Gregory Szorc

unread,
May 15, 2017, 8:39:36 PM5/15/17
to Ralph Giles, Ethan Glasser-Camp, Geoffrey Brown, dev-platform
I thought there was a bug on file, but maybe not. I've long thought the
following changes should be made:

* `mach mercurial-setup` should be rolled into `mach bootstrap`
* `mach doctor` should be rolled into `mach bootstrap`
* `mach bootstrap` should remember answers from last time and not prompt on
subsequent runs unless a flag is specified
* `mach bootstrap` should be renamed/aliased to `mach refresh` (or similar)
to reflect that it is no longer limited to initial system setup

And of course there are missing features, such as Git configuration and
offering to create a Git clone.

bootstrap, doctor, and mercurial-setup are all under-loved features. They
tend to not get prioritized very highly. Typically, new features or bug
fixes are implemented when someone feels like scratching an itch. I wish I
could justify spending more time on these things because turnkey optimal
development environments are important. But it's a lot of ongoing work and
there always seems to be something else competing for my time :(

Panos Astithas

unread,
May 16, 2017, 9:14:29 AM5/16/17
to Gregory Szorc, Ralph Giles, Ethan Glasser-Camp, Geoffrey Brown, dev-platform
I had filed bug 1257478 specifically for tackling the git configuration
issue and when this larger plan was brought up, my inclination to work on
it diminished :) If this broader work is not prioritized, could we split it
into smaller bugs so that it's manageable in weekend-sized chunks? I
realize there will be some temporary churn (e.g. a not very long-lived
'mach git-setup'), but we could get at the final goal faster.

Panos
0 new messages