Don't import _externals from every module
commit3b605b8f060ff1b8e124894e5e84d99a0e09607f
authorThomas Leonard <talex5@gmail.com>
Wed, 17 Sep 2008 15:15:54 +0000 (17 16:15 +0100)
committerThomas Leonard <talex5@gmail.com>
Wed, 17 Sep 2008 15:49:46 +0000 (17 16:49 +0100)
treec34305c43b1c7dd68c005a9255fcbc11ed8c5561
parent0d33c016e066e69695b260948565335fa3bc7d7b
Don't import _externals from every module

We were doing this to get access to the logger, but this leads to a subtle problem:

- If a module has a static constructor, it needs a ModuleInfo structure.
- If a module imports a module with a ModuleInfo structure, it needs one too, and it
  also needs access to that module's ModuleInfo (I think it chains them together).
- tango.io.Console has a static constructor.

If _externals imports tango.io.Console then it needs ModuleInfo. Everything that
imports _externals then needs ModuleInfo, which is everything. Including third
party libraries, which then fail to link.

Conflicts:

dmd/module.c
dmd/module.c