The D ecosystem in Debian with free-as-in-freedom DMD

Iain Buclaw via Digitalmars-d digitalmars-d at puremagic.com
Mon Apr 10 09:12:35 PDT 2017


On 10 April 2017 at 15:20, Matthias Klumpp via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
> On Monday, 10 April 2017 at 13:07:22 UTC, Vladimir Panteleev wrote:
>>
>> On Monday, 10 April 2017 at 12:59:37 UTC, Matthias Klumpp wrote:
>>>>
>>>> Who came up with those policies and decided that they apply to D?
>>>> Because I really don't think they should.
>>>
>>> [...]
>>> You need to see here that D is not the center of the world and we will
>>> need to make it work nicely with the rest of the system.
>>
>>
>> The opposite is also true: requiring a stable shared library API of every
>> packaged D library is just as unreasonable. In fact, to make these rules
>> useful and applicable to all D programs, you'd have to completely forbid
>> templates in the library's public interface, which would immediately exclude
>> Phobos for one.
>
>
> There is a really easy way to fix this: SONAMEs. Whenever you change
> something in the library breaking ABI or API, you bump it's SOVERSION, which
> will force the distribution to perform a transition and rebuild the
> dependency chain. If you give absolutely zero stability guarantees, you just
> set the SOVERSION equal to the project's version and trigger a transition
> every time (incredibly annoying, but, well, okay).
>

I believe GDC in Debian is done correctly on this part.  Last time
someone else looked, it seemed like LDC and DMD make use of SOVERSION,
but do so in an incorrect manner.

> This has worked nicely for every language. If you don't have templates in
> your API or don't change the templates between releases, you can survive
> with one library for a long time.
>
> This is working really great on the level of individual libraries, but if
> the whole language is ABI-unstable, the issues are much bigger and harder to
> track.
>
> Btw, at time we are just ignore the ABI issues, and surprisingly nothing
> broke yet, indicating that ABI breakage isn't very common or not affecting
> commonly used interfaces much.

Everyone should follow GDC's ABI, rather than trying to mimic DMD
calling convention. ;-)


More information about the Digitalmars-d mailing list