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

Module proposal: Gecko C++/Rust usage, tools, and style

190 views
Skip to first unread message

Nathan Froyd

unread,
Mar 9, 2016, 4:20:33 PM3/9/16
to gover...@lists.mozilla.org, Akhgari, Ehsan, Jeff Walden, Hommey, Mike, Botond Ballo
Hi all,

Several of us have been talking about having a module that covers various
aspects of how we use C++, including, but not necessarily limited to:

- language feature usage
- standard library versions/usage
- compiler/toolchain versions
- formatting/naming style (The C++ bits of
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style
, essentially)

Some of these areas (e.g. compiler/toolchain versions) have not had an
explicit owner, but have simply been driven by whoever was most motivated
to push changes forward. (Or not push changes forward, as the case may
be.) We think it would be valuable to clearly delineate the people
responsible for making these decisions and doing the work, if necessary.
There is some overlap of this module with Core/Build Config, but it seems
to us that there's enough difference to make it a separate module.

The Rust parts of this would be more forward-looking, as Rust is not yet a
significant part of Gecko, nor do we have some of the complications
provided by C++ when dealing with Rust (e.g. multiple
compiler/toolchain/standard library providers). The Rust community also
has somewhat more established guidelines around style as well.

The proposed peers of this module would be Ehsan Akhgari, Botond Ballo,
Jeff Walden, Mike Hommey, and myself. For lack of enthusiasm about being
module owner from the other peers, I suppose it falls to me to be module
owner.

Questions and suggestions welcome.

-Nathan

Gregory Szorc

unread,
Mar 11, 2016, 4:42:32 PM3/11/16
to Nathan Froyd, Akhgari, Ehsan, Botond Ballo, gover...@lists.mozilla.org, Hommey, Mike, Jeff Walden
On Wed, Mar 9, 2016 at 1:20 PM, Nathan Froyd <nfr...@mozilla.com> wrote:

> Hi all,
>
> Several of us have been talking about having a module that covers various
> aspects of how we use C++, including, but not necessarily limited to:
>
> - language feature usage
> - standard library versions/usage
> - compiler/toolchain versions
> - formatting/naming style (The C++ bits of
>
> https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style
> , essentially)
>
> Some of these areas (e.g. compiler/toolchain versions) have not had an
> explicit owner, but have simply been driven by whoever was most motivated
> to push changes forward. (Or not push changes forward, as the case may
> be.) We think it would be valuable to clearly delineate the people
> responsible for making these decisions and doing the work, if necessary.
> There is some overlap of this module with Core/Build Config, but it seems
> to us that there's enough difference to make it a separate module.
>

I agree there is overlap with Core/Build Config. But as owner of that
module, I don't see a problem. What build config cares most about from the
list of proposed module responsibilities is toolchains and build
environment foo. The way I see things happening is the proposed module
decides when to change these things, works to implement those changes, then
gets review from a build config peer on parts that change the build system.
Nothing controversial there.


>
> The Rust parts of this would be more forward-looking, as Rust is not yet a
> significant part of Gecko, nor do we have some of the complications
> provided by C++ when dealing with Rust (e.g. multiple
> compiler/toolchain/standard library providers). The Rust community also
> has somewhat more established guidelines around style as well.
>
> The proposed peers of this module would be Ehsan Akhgari, Botond Ballo,
> Jeff Walden, Mike Hommey, and myself. For lack of enthusiasm about being
> module owner from the other peers, I suppose it falls to me to be module
> owner.
>
> Questions and suggestions welcome.
>
> -Nathan
> _______________________________________________
> governance mailing list
> gover...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/governance
>

jgil...@mozilla.com

unread,
Apr 25, 2016, 6:53:59 PM4/25/16
to mozilla-g...@lists.mozilla.org
This seems like a good idea to me. It establishes a forum for style and language feature discussions, as well as establishing some form of authority.

Henri Sivonen

unread,
Apr 26, 2016, 10:41:12 AM4/26/16
to Nathan Froyd, Akhgari, Ehsan, Botond Ballo, gover...@lists.mozilla.org, Hommey, Mike, Jeff Walden
On Wed, Mar 9, 2016 at 11:20 PM, Nathan Froyd <nfr...@mozilla.com> wrote:
> - formatting/naming style (The C++ bits of
> https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style
> , essentially)
...
> The Rust community also
> has somewhat more established guidelines around style as well.

Can we, please, please decide not to fight the Rust team's and Rust
community's style choices and write Rust code in Gecko to look like
normal Rust code even if this makes Rust code in Gecko differ from C++
code in Gecko? That is, no aFoo or mFoo but unprefixed_snake_case and
formatting code in general like rustfmt does it by default. By not
fighting the conventions of the language, we'll have a better chance
of leveraging tools (starting with built-in compiler checks for
snake_case!) and getting people who want to write Rust code to
contribute to the Rust parts of Gecko.

I'm OK with style owners who agree with the above. :-)

(FWIW, I think it would be fine for snake_case to spill over to C++
code in Gecko, but I care more about keeping at least Rust code
looking like normal Rust code.)
--
Henri Sivonen
hsiv...@hsivonen.fi
https://hsivonen.fi/

Eric Rescorla

unread,
Apr 26, 2016, 5:47:16 PM4/26/16
to Henri Sivonen, Akhgari, Ehsan, Hommey, Mike, governance, Nathan Froyd, Botond Ballo, Jeff Walden
I have no specific knowledge of the Rust coding conventions, but unless
there is something truly egregious about them, I agree with Henri we should
adhere to whatever they are, provided they are in fact well-defined.

-Ekr

Ehsan Akhgari

unread,
Apr 27, 2016, 3:37:34 AM4/27/16
to Nathan Froyd, Henri Sivonen, Botond Ballo, gover...@lists.mozilla.org, Hommey, Mike, Jeff Walden
On 2016-04-27 3:29 AM, Nathan Froyd wrote:
> On Tue, Apr 26, 2016 at 10:40 AM, Henri Sivonen <hsiv...@hsivonen.fi> wrote:
>> On Wed, Mar 9, 2016 at 11:20 PM, Nathan Froyd <nfr...@mozilla.com> wrote:
>>> - formatting/naming style (The C++ bits of
>>> https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style
>>> , essentially)
>> ...
>>> The Rust community also
>>> has somewhat more established guidelines around style as well.
>>
>> Can we, please, please decide not to fight the Rust team's and Rust
>> community's style choices and write Rust code in Gecko to look like
>> normal Rust code even if this makes Rust code in Gecko differ from C++
>> code in Gecko? That is, no aFoo or mFoo but unprefixed_snake_case and
>> formatting code in general like rustfmt does it by default.
>
> I could have been clearer in my original email. My plan was to take
> whatever conventions Rust has around style, including whatever rustfmt
> does by default, and let that be our Rust style. I'm happy to let
> style wars be a settled thing as far as Rust goes.

Seconded. Our rust style should be "whatever rustfmt does by default."
No need to have another battle ground for the holy style wars, we have
enough of those as it is! :-)

If and when that proves to be insufficient, we can re-evaluate.

Nathan Froyd

unread,
Apr 28, 2016, 12:22:20 AM4/28/16
to Henri Sivonen, Akhgari, Ehsan, Botond Ballo, gover...@lists.mozilla.org, Hommey, Mike, Jeff Walden
On Tue, Apr 26, 2016 at 10:40 AM, Henri Sivonen <hsiv...@hsivonen.fi> wrote:
> On Wed, Mar 9, 2016 at 11:20 PM, Nathan Froyd <nfr...@mozilla.com> wrote:
>> - formatting/naming style (The C++ bits of
>> https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style
>> , essentially)
> ...
>> The Rust community also
>> has somewhat more established guidelines around style as well.
>
> Can we, please, please decide not to fight the Rust team's and Rust
> community's style choices and write Rust code in Gecko to look like
> normal Rust code even if this makes Rust code in Gecko differ from C++
> code in Gecko? That is, no aFoo or mFoo but unprefixed_snake_case and
> formatting code in general like rustfmt does it by default.

I could have been clearer in my original email. My plan was to take
whatever conventions Rust has around style, including whatever rustfmt
does by default, and let that be our Rust style. I'm happy to let
style wars be a settled thing as far as Rust goes.

-Nathan

Ehsan Akhgari

unread,
Jan 3, 2017, 7:16:45 PM1/3/17
to Nathan Froyd, Henri Sivonen, Botond Ballo, gover...@lists.mozilla.org, Hommey, Mike, Jeff Walden
We waited a long time here, but there has been no objections. I just went
ahead and created the module: <
https://wiki.mozilla.org/Modules/Core#C.2B.2B.2FRust_usage.2C_tools.2C_and_style>.
I decided to own this since nobody else was in a rush to do so, but the
decision making in the various sub-parts of this module is owned by the
respective peers who are expert in that area.

Cheers,
Ehsan

On Wed, Apr 27, 2016 at 3:12 AM, Ehsan Akhgari <ehsan....@gmail.com>
wrote:

> On 2016-04-27 3:29 AM, Nathan Froyd wrote:
> Seconded. Our rust style should be "whatever rustfmt does by default."
> No need to have another battle ground for the holy style wars, we have
> enough of those as it is! :-)
>
> If and when that proves to be insufficient, we can re-evaluate.
>



--
Ehsan
0 new messages