Re: dirEntries within static foreach: memory.d(827): Error: fakePureErrno cannot be interpreted at compile time, because it has no available source code

2019-02-10 Thread Seb via Digitalmars-d-learn
On Monday, 11 February 2019 at 01:05:05 UTC, kdevel wrote: On Monday, 11 February 2019 at 00:54:27 UTC, Seb wrote: On Monday, 11 February 2019 at 00:19:02 UTC, kdevel wrote: [...] You can't read or list files at compile-time. dmd can read files at compile time using the import function

Re: dirEntries within static foreach: memory.d(827): Error: fakePureErrno cannot be interpreted at compile time, because it has no available source code

2019-02-10 Thread kdevel via Digitalmars-d-learn
On Monday, 11 February 2019 at 00:54:27 UTC, Seb wrote: On Monday, 11 February 2019 at 00:19:02 UTC, kdevel wrote: [...] You can't read or list files at compile-time. dmd can read files at compile time using the import function [1] What are you trying to do? Incorporate HTML template

Re: dirEntries within static foreach: memory.d(827): Error: fakePureErrno cannot be interpreted at compile time, because it has no available source code

2019-02-10 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, February 10, 2019 5:19:02 PM MST kdevel via Digitalmars-d-learn wrote: > I am trying to get this code compiled: > > ```TemplateStore.d > module TemplateStore; > import std.path; > import std.conv; > import std.file; > > immutable string[string] template_map; > > static this () > { >

Re: dirEntries within static foreach: memory.d(827): Error: fakePureErrno cannot be interpreted at compile time, because it has no available source code

2019-02-10 Thread Seb via Digitalmars-d-learn
On Monday, 11 February 2019 at 00:19:02 UTC, kdevel wrote: I am trying to get this code compiled: ```TemplateStore.d module TemplateStore; import std.path; import std.conv; import std.file; [...] You can't read or list files at compile-time. What are you trying to do?

dirEntries within static foreach: memory.d(827): Error: fakePureErrno cannot be interpreted at compile time, because it has no available source code

2019-02-10 Thread kdevel via Digitalmars-d-learn
I am trying to get this code compiled: ```TemplateStore.d module TemplateStore; import std.path; import std.conv; import std.file; immutable string[string] template_map; static this () { static foreach (f; dirEntries (``, `*.html`, SpanMode.shallow)) { pragma (msg, `reading template