aboutsummaryrefslogtreecommitdiff
path: root/bdep/project.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2021-07-09 20:55:15 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2021-07-20 17:08:09 +0300
commit07ab59a93f9447d5489743e8d7e19b6adb5ebbf1 (patch)
treeaa202b26e7ac2b3b6477855e250ab0464301fd2d /bdep/project.hxx
parent8da242097fcaec5f3676f8d2296b639879825ddd (diff)
Add support for configuration type and bdep-config-link sub-command
Diffstat (limited to 'bdep/project.hxx')
-rw-r--r--bdep/project.hxx24
1 files changed, 19 insertions, 5 deletions
diff --git a/bdep/project.hxx b/bdep/project.hxx
index 86b833f..5c6be87 100644
--- a/bdep/project.hxx
+++ b/bdep/project.hxx
@@ -15,7 +15,11 @@
#include <bdep/project-options.hxx>
-#pragma db model version(1, 1, closed)
+// Used by the data migration entries.
+//
+#define DB_SCHEMA_VERSION_BASE 1
+
+#pragma db model version(DB_SCHEMA_VERSION_BASE, 2, closed)
// Prevent assert() macro expansion in get/set expressions. This should appear
// after all #include directives since the assert() macro is redefined in each
@@ -85,6 +89,7 @@ namespace bdep
//
optional_uint64_t id;
optional_string name;
+ string type;
dir_path path;
optional_dir_path relative_path;
@@ -122,6 +127,7 @@ namespace bdep
//
configuration (optional_uint64_t i,
optional_string n,
+ string t,
dir_path p,
optional_dir_path rp,
bool d,
@@ -130,6 +136,7 @@ namespace bdep
vector<package_state> ps)
: id (i),
name (move (n)),
+ type (move (t)),
path (move (p)),
relative_path (move (rp)),
default_ (d),
@@ -166,12 +173,15 @@ namespace bdep
// Given the project directory, database, and options resolve all the
// mentioned configurations or, unless fallback_default is false, find the
- // default configuration if none were mentioned. Unless validate is false,
+ // default configurations if none were mentioned. Unless validate is false,
// also validate that the configuration directories still exist.
//
+ // Besides configurations, also return an indication if they are retrieved
+ // as a fallback to default configurations (true if that's the case).
+ //
using configurations = vector<shared_ptr<configuration>>;
- configurations
+ pair<configurations, bool>
find_configurations (const project_options&,
const dir_path& prj,
transaction&,
@@ -255,10 +265,14 @@ namespace bdep
return find_project_packages (o, true /* ignore_packages */).project;
}
- // Verify all the packages are present in all the configurations.
+ // Verify that each package is present in at least one configuration.
+ //
+ // Note that the default configurations fallback indication (see above) is
+ // only used for diagnostics.
//
void
- verify_project_packages (const project_packages&, const configurations&);
+ verify_project_packages (const project_packages&,
+ const pair<configurations, bool>&);
// Determine the version of a package in the specified package (first
// version) or configuration (second version) directory.