aboutsummaryrefslogtreecommitdiff
path: root/build2/version/module.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-03-08 13:27:51 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-03-08 16:42:37 +0300
commit7e34f1a99bd6ac9e604ee1c85ec6224928ba81f7 (patch)
tree8e67406cf91541df9bc07f1be7117fe654a501e8 /build2/version/module.hxx
parent77410b0cdde47219d6c6a36533fcb9354f17c3dd (diff)
Use real package names rather than sanitized ones for diagnostics in version module
Diffstat (limited to 'build2/version/module.hxx')
-rw-r--r--build2/version/module.hxx20
1 files changed, 15 insertions, 5 deletions
diff --git a/build2/version/module.hxx b/build2/version/module.hxx
index 46af616..1c6e637 100644
--- a/build2/version/module.hxx
+++ b/build2/version/module.hxx
@@ -16,13 +16,23 @@ namespace build2
{
namespace version
{
- // The 'depends' values from manifest. Note that the package names are
- // sanitized for use in variable names.
+ // A map of package names sanitized for use in variable names to the
+ // 'depends' values from manifest.
//
- using dependency_constraints = std::map<string, string>;
+ using package_name = project_name;
+
+ struct dependency
+ {
+ package_name name;
+ string constraint;
+ };
+
+ using dependencies = std::map<string, dependency>;
struct module: module_base
{
+ using dependencies_type = version::dependencies;
+
static const string name;
// The project variable value sanitized for use in variable names.
@@ -33,7 +43,7 @@ namespace build2
bool committed; // Whether this is a committed snapshot.
bool rewritten; // Whether this is a rewritten .z snapshot.
- dependency_constraints dependencies;
+ dependencies_type dependencies;
bool dist_uncommitted = false;
@@ -41,7 +51,7 @@ namespace build2
butl::standard_version v,
bool c,
bool r,
- dependency_constraints d)
+ dependencies_type d)
: project (p.variable ()),
version (move (v)),
committed (c),