Thoughts on versioning

Andrei Alexandrescu SeeWebsiteForEmail at
Tue Oct 26 14:41:38 UTC 2021

On 10/26/21 3:04 AM, Sebastiaan Koppe wrote:
> On Tuesday, 26 October 2021 at 06:03:38 UTC, sarn wrote:
>> On Tuesday, 26 October 2021 at 01:19:29 UTC, Andrei Alexandrescu wrote:
>>> Goals of library versioning:
>>> - avoid copy-and-paste code duplication across versions
>> This might be overengineering.  Unless new features are going to be 
>> backported to the original std, is there anything wrong with just 
>> forking std to std2?
> Yeah, I kind of agree there, just copy the stuff. Simple and effective; 
> no crazy mixins or module aliases.

Indeed that's simple and would allow trivial concurrent use of the two 

I foresee the following challenges:

* Evolution to future versions. Does copying the whole codebase and 
tweaking it scale to e.g. annual releases of Phobos? Five years from now 
we'll have essentially five copypastas. How do you maintain them?

* For maintenance across versions, Adam proposed in discord that we 
leverage git patching. You copy the codebase, master is the most recent, 
and bugfixes are cherry-picked into previous releases (which are copies 
of the git tree at defined points in time). I am unclear (as others on 
discord seem to be) about how well this will work and what to do when it 
breaks - e.g. cherry-picking fails etc. Judging by an old refactoring PR 
that I'm trying to rebase - - it is nigh impossible. 
And that's just a refactoring that doesn't aim to change semantincs, 
unlike phobos evolution. I am worried this will become a huge drag that 
will discourage us from doing maintenance as much as we are not 
discouraged from doing evolution. We should aim for both.

More information about the Digitalmars-d mailing list