DMD needs branches
Roberto Mariottini
rmariottini at mail.com
Thu Apr 12 00:32:09 PDT 2007
Walter Bright wrote:
> Chris Miller wrote:
>> I know, I know, report bugs. This doesn't cut it. Reporting bugs is
>> hard as hell and time consuming. I need time to report bugs. Now I
>> have to either restrict use to specific compiler versions, which
>> people don't always know about and report their issues back to me,
>> until I remind them they need to downgrade their compiler (which isn't
>> always an option if they need bug fixes), or I have to rush to fix my
>> code to workaround such issues and report bugs. If there was a stable
>> branch, I could get the code working with the unstable branch at a
>> reasonable pace.
>
> Please let me know which issues are breaking your code. I'll be sure
> they get in the test suite so they'll never break again.
I think it's not a matter of a few issues. I think the problem is in the
_language_ changes.
Branching is something that works very well in many projects (the Linux
kernel is one notable example) but also all of my projects are
version-based, with one branch per version.
Using CVS or Subversion makes this very easy: you make the modification
on the main trunk, then selectively apply them to the desired branches.
This worked flawlessly for me, saving me a lot of problems and headaches.
The STABLE branch is something old and working, without all the new
whistles and bells, but that can compile legacy code(1). The main trunk,
aka the UNSTABLE branch, is something new, with all the new features
available, but possibly breaks old code.
I know that maintaining the current compiler is already a demanding
task, but maintaining only one stable version is not that difficult.
Simply branch the code at a particular version and keep working on the
new code. If you find that a bug fix can also be applied to the old code
then apply it. If fixing the bug in the old code is too much work and/or
the bug is not applicable to the new code, then document it and say
simply: "this is a known bug and will be fixed in the next major
release". The change of major version can be done once a year: the
STABLE compiler is considered OLD and no more updated, the UNSTABLE
compiler branches becoming both the STABLE branch and the UNSTABLE main
trunk.
This always worked for me.
Ciao
(1) What is "legacy code"?
"Legacy code" is a term often used derogatorily to characterize code
that is written in a language or style that (1) the speaker/writer
consider outdated and/or (2) is competing with something sold/promoted
by the speaker/writer. "Legacy code" often differs from its suggested
alternative by actually working and scaling. (from the Stroustrup FAQ:
http://www.research.att.com/~bs/bs_faq.html#legacy)
More information about the Digitalmars-d
mailing list