Exported for tests only: Precise control over API visibility with custom warnings

Last December I wrote a post on the Scrive engineering blog regarding user-defined warnings, and how they can be used to convey usage of unsafe constructors

6 Likes

shouldn’t you qualify
-x-unsafe-internals with at least your package? -x-mypackage-unsafe-internals ? otherwise a library that uses this technique couldn’t depend on another library that also uses this technique without issues?

True, although when you start to depend on more than 100 dependencies, conventions are really useful in this regard. :slight_smile:

1 Like