relative imports and duplicate includes

Kacper Wysocki kacperw at gmail.com
Tue Nov 17 05:06:43 CET 2015


Hi all,

attached is a patch to make 'import foo' relative to the importing source file,
and a patch to remove the error upon duplicate 'include'.

vcl that comes from the cli or f_arg doesn't get a path, but in this
case we fallback to vcl_dir. This means the same behavior for absolute
paths and one-directory deep relative includes under vcl_dir.

Use case: These two patches together make it possible to write and
release a self-contained vcl package which you can include into your
vcl.

PRs are on github fwiw.

0K
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Allow-duplicate-vmod-imports.patch
Type: text/x-patch
Size: 2128 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20151117/6bb7eb8c/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-VCL-relative-includes.patch
Type: text/x-patch
Size: 5861 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20151117/6bb7eb8c/attachment-0003.bin>


More information about the varnish-dev mailing list