Am 01.05.2019 um 00:09 schrieb Carl Sturtivant:

Hello, I notice that for D files in the source directory of a dub vibe.d build that a hierarchy of directories and source files is treated as if all the source files are in the root (source) directory. This is excellent as it permits reorganization without modifying the build or the source code.

However this does not hold for diet templates in the views directory. If I put a sub-directory in the views directory and move a template down there, dub build doesn't find it any more and complains it doesn't exist or is not on a path given by the -J flag used to restrict the origin of import expressions.

Is there any way to allow the same freedom to organize diet templates in the views directory that source code has in the source directory?

It used to be the case that accessing files within sub directories of
directories specified by -J was explicitly disallowed in the compiler.
However, it appears that people were able to change Walter's mind and
the behavior got revised in 2016:

I don't remember which limitations DUB and/or diet-ng have inherited
from the old DMD restriction, but I'll look into it ASAP.