Bug 11904 – Error: this cannot be interpreted at compile-time (core/time.di)
Status
RESOLVED
Resolution
INVALID
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-01-11T09:23:06Z
Last change time
2018-10-22T04:04:22Z
Keywords
CTFE
Assigned to
No Owner
Creator
Marco Leise
Comments
Comment #0 by Marco.Leise — 2014-01-11T09:23:06Z
I tried to compile dub with dub itself like so: dub build --compiler=gdc
and got this error message:
/usr/include/d/4.8.1/x86_64-pc-linux-gnu/core/time.di:224: Error: this cannot be interpreted at compile time, because it has no available source code
/usr/include/d/4.8.1/std/net/curl.d:195: called from here: dur(2L)
It looks like there is no clear way for the D compiler even in Phobos and druntime to figure out what source needs to stay in the .di file.
Is that a systematic failure? I ask that because up to 100% of any library code could be run at compile time and CTFE only works when the source is available. In effect that means that subtle changes like changing a global variable from mutable to immutable or enum only work if Phobos is installed with full source files, which at least GDC seems to try and avoid (probably in order to speed up compilation due to the high interdependencies in Phobos modules).
Comment #1 by Marco.Leise — 2014-01-11T09:45:34Z
The latest versions of GDC no longer install interface files. This error occurred for the 2.063.2 version.
Comment #2 by pro.mathias.lang — 2018-10-22T04:04:22Z
Looks like this bug is quite outdated, and actually relates to GDC.
I'm going to close this since the issue itself seems resolved.
If you have another report which is GDC-related, please direct it to https://bugzilla.gdcproject.org/