Both safe and wrong?

Seb seb at wilzba.ch
Wed Feb 13 22:59:24 UTC 2019


On Wednesday, 13 February 2019 at 00:25:27 UTC, XavierAP wrote:
> I wouldn't add any new semantics or mechanism. If the code is 
> being compiled, @safe should be enforced. I was talking about 
> the situation where you link to binary libraries (compiled with 
> an old version with this bug).
>
> Whenever (very often) dependencies are compiled from source 
> instead, the new errors should simply pop up and break the 
> compilation. This also means that at the same time this is 
> fixed in the compiler, any such unsafe code in Phobos should be 
> fixed.

Yup, Phobos always gets compiled with `-de` on _every_ PR to DMD, 
s.t. every fix/improvement to the compiler needs to fix Phobos 
(and druntime first).

Also, the ~ top50 Dub project are tested as well 
(https://buildkite.com/dlang), so that's why (hard) breaking 
changes aren't going to happen these days.
Here's a recent example:

https://github.com/dlang/dmd/pull/9154

Though of course there have been exceptions where @safe-ty fixes 
affected only one of those 50 Dub packages and have been deemed 
as critical (+ affecting only a small subset + easy to fix), so 
that simply that one package was fixed.


More information about the Digitalmars-d mailing list