harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Etienne Gagnon <egag...@sablevm.org>
Subject Re: [classlib] Preprocessor - CHECKPOINT
Date Thu, 02 Nov 2006 19:05:41 GMT
Geir Magnusson Jr. wrote:
>> I have nothing against this!  But, we have to make sure:
>> 1- we don't lose the "communication" aspect of telling developers about
>>  parrallel development.
> 
> I'm not sure I understand what problem you are trying to solve there. We
> do parallel development on the source base right now - no one ever does
> a blocking checkout - it's optimistic.


What tells you, when you modify method m() of class C that,in the middle
of it, there's different ways of processing something in j2se6?

e.g.

class C
{
  .../* many, many methods */

  private void m()
  {
    ... /* canonical j2se5 code */
    ...
    // @Process(j2se6)
    // { do something additional }
    ...
    ...
  }
}


So, if you were, for example, to move m() to become the first method,
and ALSO change its name...


class C
{
  private void m2()
  {
    ... /* canonical j2se5 code with modifications!! */
    ...
    // @Process(j2se6)
    // { do something additional }
    ...
    ...
  }

  .../* many, many methods */

}



Such changes are usually not dealt with very neatly with "svn merge".
Now, if using the processign tool, you get at least 2 benefits over "svn
merge":
1- No need to do any "svn merge"...  The method was moved AND renamed
even for j2se6.
2- You were aware, when moving the method and changing its name that you
could possibly be making the life of j2se6 developers a little more
difficult.

The "communication" aspect of 2 can be quite helpful when doing
system-wide changes.  Just think about the effect of simply doing a
system-wide reindentation of source code; this is a nightmare when
developing using branches, as diff/merge tools are line-based, not
syntax-based.  So, if your new indenter moves things across lines,
you're in hell.

Believe me; I've lived through that trying to maintain a "well indented"
GNU Classpath in SableVM's repository.

I am not saying that using the tool should replace using branches for
all situations, but there are situations where it would be more
effective not to use branches when the code is mostly identical.  Using
traditional pre-processing tools, in such cases, is often the solution
adopted by some people; the problems of "simply-mided" traditiona
pre-processing has been discussed earlier in this thread.  I am
proposing, instead, to use an innovative "syntax-based, revertable
processing".  That's all.  [I guess you'll need to see it working to
make sense of it...  I'll work on a prototype.  I've just submitted the
ICLA/ACQ].

Etienne

-- 
Etienne M. Gagnon, Ph.D.            http://www.info2.uqam.ca/~egagnon/
SableVM:                                       http://www.sablevm.org/
SableCC:                                       http://www.sablecc.org/

Mime
View raw message