On 3/5/09 12:11 PM, Konstantin Osipov wrote:
> As a follow up to the MySQL University session on the coding
> style today, let me present a proposal for the process around it
> to your criticism.
> To those who missed the session: the main idea with the server
> coding style I advocate is that we need to revive it, make it a
> living document.
> The proposal below allows for flexibility within technical teams
> -- either to appoint a coding style captain, or vote on every
> change separately. A team can decide to share a coding style with
> another team.
> The main point is that the new process allows to introduce
> changes, and assigns out responsibilities, too.
I disagree, i think we should stick to one single common set of coding
style rules for the core parts of the server (that is, everything but
> Coding style.
> All code contributed to the server must adhere to a coding
> style. Since many parts of the server historically originate from
> different development environments, it seems unnecessary to demand
> that all technical teams follow the same style. Besides, the
> existing code base doesn't satisfy this requirement.
It's necessary, we can't perpetuate this. We should overtime gradually
fix what is not conformant (granted that the file is being modified
and/or maintained overtime). OTOH, we shouldn't worry about about coding
style for files that were updated once or twice in this decade. Also,
important to note that if the coding style of a file differs
significantly from our rules, we should either gradually fix it or stick
to the current style of the file.
> Taking this observation into account, the following procedure is
> 1. A member of the server team is assigned to oversee the coding
> style matters. Responsibility of this person is to ensure that
> each technical team maintains and adheres to a coding
> style, according to these procedures. Any violations or
> difficulties with are to be brought up by this person with
> server management.
> 2. It's up to a technical team (replication, optimizer, etc) to come
> up with their coding style.
> However, in all teams:
> * it should be applied consistently to all source files and
> directories maintained by the team
> * the style must be documented in the MySQL Internals Manual.
> In particular, the scope of the application should be
> documented and unambiguous. A process to make amendments
> to the style should be accepted by the team and documented as
> * the team has an appointed person to ensure that the coding
> style is followed. This person is responsible also is responsible
> for ensuring that the coding standard is amended according to
> the agreed procedure.
> The server core teams (the runtime and the optimizer teams)
> maintain all files in sql/, libmysql/, mysys/ and strings/
> directories of the server.
> The coding style is documented at:
> The person in the team(s) to ensure that the coding style is
> followed is<name> (needs to be appointed).
> The process to make amendments to the coding style is<missing
This is something that reviewers should be looking at. Patches shouldn't
be approved if they don't follow the coding style.
-- Davi Arnaut