
This patch makes erlware_commons easier to include as a dependency by removing depedencies that are not needed at run time. The top-level Makefile creates a .DEV_MODE marker file which is detected by rebar.config.script. When the marker file is present, the development only dependencies proper and neotoma are included and a macro 'DEV_ONLY' is defined. The macro is used to only enable the proper tests for development mode. The ec_semver_parser.peg is now located in priv/ and is moved into src/ by the Makefile. The generated ec_semver_parser.erl is now under version control; it need not be rebuilt by all projects wishing to include erlware_commons. It will be rebuilt, as before this change, on every make invocation.
14 lines
No EOL
657 B
Text
14 lines
No EOL
657 B
Text
semver <- major_minor_patch_min_patch ("-" alpha_part ("." alpha_part)*)? ("+" alpha_part ("." alpha_part)*)? !.
|
|
` ec_semver:internal_parse_version(Node) ` ;
|
|
|
|
major_minor_patch_min_patch <- ("v"? numeric_part / alpha_part) ("." version_part)? ("." version_part)? ("." version_part)? ;
|
|
|
|
version_part <- numeric_part / alpha_part ;
|
|
|
|
numeric_part <- [0-9]+ `erlang:list_to_integer(erlang:binary_to_list(erlang:iolist_to_binary(Node)))` ;
|
|
alpha_part <- [A-Za-z0-9]+ `erlang:iolist_to_binary(Node)` ;
|
|
|
|
%% This only exists to get around a bug in erlang where if
|
|
%% warnings_as_errors is specified `nowarn` directives are ignored
|
|
|
|
`-compile(export_all).` |