Open
Description
Module packages are allowed to combine overload sets, but they should never introduce new public symbols.
Consider the following package:
lib
| a.d
| b.d
| package.d
// lib/a.d
module lib.a;
void fooA();
// lib/b.d
module lib.b;
void fooB();
// lib/package.d
module lib;
public import lib.a;
public import lib.b;
void bar();
If the user wants to use lib.bar
, he is forced to also import lib.a
and lib.b
.
The solution is to move bar
to a separate module that the package module will publicly import. This module may have some generic name like lib/utils.d
, or the same name as the package: lib/lib.d
.
Offending modules in Phobos:
std.container
std.digest
std.experimental.allocator
std.format
std.range
std.regex
std.uni