On Monday, 15 July 2019 at 12:57:46 UTC, Mike Franklin wrote:
On Monday, 15 July 2019 at 12:27:22 UTC, Vladimir Panteleev
wrote:
This isn't exactly true. The restriction is that core should
not *import* rt. Have a look at all the extern(C) definitions
in Druntime - using extern(C) functions to communicate between
the compiler and rt, as well as core and rt, is not a "hack",
but an established mechanism to invoke the low-level
implementations in Druntime.
We are trying to implement many of those `extern(C)` runtime
hooks as templates. Those templates need to be implicitly
imported through object.d. That means code that was in `rt` is
converted to a template, and then moved to object.d. However,
as we do more and more of them object.d becomes unwieldy.
I took the initiative to prevent object.d from turning into a
more of a monstrosity that it already is, and moved those
runtime templates (which used to reside in `rt`) back into `rt`.
This is not a problem, and not at all related to the issue we're
discussing. The problem is that you chose to move them into `rt`
instead of somewhere under `core`, which would respect existing
conventions and avoid breakages like the ones we've seen reported
in this thread.