[Issue 20023] Separate compilation breaks dip1000 / dip1008 @safety

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Mar 14 09:40:04 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=20023

John Colvin <john.loughran.colvin at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |industry

--- Comment #2 from John Colvin <john.loughran.colvin at gmail.com> ---
(In reply to Walter Bright from comment #1)
> This is explained because some of the checks are only done for modules that
> are present on the command line. You can see this in the line:
> 
>     if (sc._module && sc._module.isRoot() &&
> 
> https://github.com/dlang/dmd/blob/master/src/dmd/escape.d#L1205
> 
> You can find the isRoot() check in several places.
> 
> This is done to ease the transition to dip1000 by not checking code that is
> only imported, presumably from 3rd party libraries which would be
> impractical for the user to change himself.
> 
> Once dip1000 becomes thoroughly propagated to old libraries, this can be
> tightened up, but not now.

Wow, I did not realise that was the case.

Does this mean that many things I think are really safe aren't at all?
Depending on exactly how I compile my code? That sounds like a nightmare.

Unless I'm misunderstanding you, I desperately want to be able to turn this
transition aid off immediately and go fix the problems it has been hiding.

Also, should this really be closed as wontfix? Presumably it will be fixed,
just not yet?

Adding industry.

--


More information about the Digitalmars-d-bugs mailing list