DIP 1028 @safe by default: compilability list of all dub packages

Mathias Lang pro.mathias.lang at gmail.com
Wed Jan 8 13:28:12 UTC 2020

On Tuesday, 7 January 2020 at 21:04:38 UTC, WebFreak001 wrote:
> well this project should just give a general idea of the state 
> of the ecosystem and not fully be able to build all projects. 
> Right now this is a 50 line D file I manually run inside a GNU 
> screen on a copy of my dub projects folder and then sort the 
> output index.html using vim :p
> In reality a few more projects will actually build properly 
> there, but a lot of project which currently are marked as 
> working won't actually work because of used templates not being 
> instantiated right now.
> So only really by having broken applications using the 
> libraries it's possible to know which libraries are broken.

Replying to 
as well.

Thanks for the explanation. So what happens is that, thanks to 
`-b syntax`, semantic3 is not called on the functions which are 
outside the (dub) package. In other word, the following code:
--- foo.d
module foo;
import bar;
void main () @safe
--- bar.d
module bar;
void callSafe() @safe
void notReally() @system {}

Will not error out (try it: `dmd -o- foo.d`). Which is the 
expected behavior in that case.

So all we need now is to have explicit `@system` on all 
functions, as Walter has proposed in the other thread.

More information about the Digitalmars-d mailing list