Thoughts on versioning
ajieskola at gmail.com
Wed Oct 27 18:01:47 UTC 2021
On Tuesday, 26 October 2021 at 01:19:29 UTC, Andrei Alexandrescu
> Versioning Phobos would free us from maintaining backward
> compatibility with a variety of decisions that did not
> withstand the test of time
I have a relatively simple LTS scheme in mind:
- We agree on a scheme for long-term support Phobos versions. For
the sake of example, let's say we agree on 2.096 and every sixth
minor version afterwards (2.102, 2.108 and so on).
- Any released DMD is required to compile all LTS Phobos versions
older than the DMD. LTS Phobos versions may be patched to satisfy
that requirement, so no need to keep around any DMD bugs or old
features Phobos depends on. However, the LTS Phobos versions do
not aim to support using newer language features. Phobos bug
fixes may but are not required to be backported.
- DRuntime always uses the same version as DMD, and thus must
also be compatible with older Phobos LTS versions.
- We change the language to allow relative imports, and convert
Phobos to use them. This is needed to allow using two or more
different versions of Phobos side-by-side.
- After these are in place, we may proceed with relatively
aggressive changes in Phobos.
These do not mean that big a maintenance burden, because the LTS
versions are only required to be kept compiling - only a fraction
of the effort that would be needed to backport the bug fixes or
new features. Also the LTS Phobos would act as a good real-world
regression test for DMD and DRuntime.
However, this plan requires that Phobos must stop calling
DRuntime internals directly - otherwise it's going to cause lots
of trouble with this scheme. I don't think that is a problem
though - Phobos is supposed to be just another library. Surely it
does not need special privileges to do its job? If it needs,
DRuntime needs a redesign.
More information about the Digitalmars-d