-
Notifications
You must be signed in to change notification settings - Fork 377
VIP3: VCL implemented VMODS
Allow VMOD-like packages to be built from pure VCL source code.
The "include" facility in VCL is purely textual, allowing such weirdness as:
if (include "foobar.vcl") {
...
}
This is a nice and strong mechanism, but it comes with built in limitations.
For instance we have to be very restrictive about where nested includes come from, and this makes it hard to use include for packages of VCL functionality, which cannot simply be dumped in their own subdirectory.
On encountering a "import" statement which imports a VCL file rather than a VMOD, the VCC should spawn a new copy of itself that compiles the VCL code into a VMOD.
A new reserved word ("public" ?) will be necessary to mark the typed VCL functions which should be exported to the importing VCL code.
When compiling VCL into VMOD, the "include" functionality should resolve relative to the directory of the imported VCL file.