diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2019-10-25 23:33:46 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2019-10-31 19:21:38 +0300 |
commit | 8e257991d80277950915a77857ea7e724001b195 (patch) | |
tree | 179129af74b06570a59054e9cc59a1b743b7cecc /libbrep/package.hxx | |
parent | 6f42144f6b0258cb46dc796c9251f57c72b23ee8 (diff) |
Add support for tests, examples, and benchmark package manifest values
Diffstat (limited to 'libbrep/package.hxx')
-rw-r--r-- | libbrep/package.hxx | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/libbrep/package.hxx b/libbrep/package.hxx index 9733374..b9a7c00 100644 --- a/libbrep/package.hxx +++ b/libbrep/package.hxx @@ -21,7 +21,7 @@ // #define LIBBREP_PACKAGE_SCHEMA_VERSION_BASE 14 -#pragma db model version(LIBBREP_PACKAGE_SCHEMA_VERSION_BASE, 16, closed) +#pragma db model version(LIBBREP_PACKAGE_SCHEMA_VERSION_BASE, 17, closed) namespace brep { @@ -86,9 +86,9 @@ namespace brep // dependencies // - using bpkg::dependency_constraint; + using bpkg::version_constraint; - #pragma db value(dependency_constraint) definition + #pragma db value(version_constraint) definition // Notes: // @@ -139,7 +139,7 @@ namespace brep using package_type = brep::package; package_name name; - optional<dependency_constraint> constraint; + optional<version_constraint> constraint; // Resolved dependency package. NULL if the repository load was shallow // and so the package dependencies are not resolved. @@ -389,6 +389,9 @@ namespace brep optional<email_type> build_error_email, dependencies_type, requirements_type, + small_vector<dependency, 1> tests, + small_vector<dependency, 1> examples, + small_vector<dependency, 1> benchmarks, build_class_exprs, build_constraints_type, optional<path> location, @@ -449,6 +452,9 @@ namespace brep optional<email_type> build_error_email; dependencies_type dependencies; requirements_type requirements; + small_vector<dependency, 1> tests; + small_vector<dependency, 1> examples; + small_vector<dependency, 1> benchmarks; build_class_exprs builds; // Note: foreign-mapped in build. build_constraints_type build_constraints; // Note: foreign-mapped in build. @@ -552,6 +558,15 @@ namespace brep set(odb::nested_set (this.requirements, std::move (?))) \ id_column("") key_column("") value_column("id") + // tests, examples, benchmarks + // + // Seeing that these reuse the dependency types, we are also going to + // have identical database mapping. + // + #pragma db member(tests) id_column("") value_column("dep_") + #pragma db member(examples) id_column("") value_column("dep_") + #pragma db member(benchmarks) id_column("") value_column("dep_") + // builds // #pragma db member(builds) id_column("") value_column("") \ |