May 29, 2023
https://issues.dlang.org/show_bug.cgi?id=23942

          Issue ID: 23942
           Summary: deprecated public import
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody@puremagic.com
          Reporter: dlang-bugzilla@thecybershadow.net

Consider a module which provides a public import, but wants to stop providing it.

"deprecated public import" currently compiles, but doesn't seem to do anything. It would be nice if it caused a deprecation warning every time another module used it to use a symbol in the public-imported module.

// pub.d
int someSymbol;
// mod.d
deprecated public import pub;
// user.d
import mod;
int fun() { return someSymbol; } // should cause a deprecation warning

--