Commit 6a26f194 authored by Geoff Simmons's avatar Geoff Simmons

Update the CONTRIBUTING notes for developers.

parent ad0bfe30
Pipeline #271 skipped
......@@ -13,11 +13,11 @@ For developers
--------------
The build specifies C99 conformance, all compiler warnings turned on,
and all warnings considered errors (compiler options ``-std=c99
-Werror -Wall -Wextra``).
and all warnings considered errors (compiler options
``-std=c99 -Werror -Wall -Wextra``).
The VMOD has been tested with both the gcc and clang compilers, and
should always compile and test successfully with both of them.
MUST always compile and test successfully with both of them.
By default, ``CFLAGS`` is set to ``-g -O2``, so that symbols are
included in the shared library, and optimization is at level
......@@ -28,3 +28,31 @@ For development/debugging cycles, the ``configure`` option
``--enable-debugging`` is recommended (off by default). This will turn
off optimizations and function inlining, so that a debugger will step
through the code as expected.
The configure script runs a check to determine if the PCRE2 lib
against which it is built has Unicode enabled. If so, then some vtc
tests in ``src/tests`` with the suffix ``.yes`` are enabled, by
temporarily copying them to files with the ``.vtc`` ending, so that
``make check`` executes them. If not, then tests with the ``.no``
suffix are enabled. The VMOD MUST always pass all tests under both of
these conditions; so it is advisable to have the PCRE2 source
repository on your system, so that you can build it with and without
Unicode, and test the VMOD against both versions.
Following the PCRE2 test code, the configure script uses ``locale -a``
to determine if the ``fr_FR`` locale is installed. If so, it runs
tests using that locale, again by temporarily copying a vtc script
with the ``.yes`` suffix, or else the ``.no`` suffix. The VMOD MUST
always pass these tests as well, so it is advisable to enable
``fr_FR`` on your system (you may need to run a command like
``locale-gen``).
The VMOD makes no attempt to support some of the more obscure
properties of PCRE2 that are not likely to be relevant on any platform
on which Varnish runs. For example, we won't bother with EBCDIC. But
in general, the VMOD MUST NOT be developed in such a way that it
assumes or depends on the availability or unavailability of PCRE2's
build-time features. For example, it MUST be possible to build the
VMOD against a version of the library for which Unicode and JIT are
disabled, and then deploy the compiled code in an environment in which
are those features are available and can be used by the VMOD.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment