From 7e34f1a99bd6ac9e604ee1c85ec6224928ba81f7 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 8 Mar 2019 13:27:51 +0300 Subject: Use real package names rather than sanitized ones for diagnostics in version module --- build2/version/module.hxx | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'build2/version/module.hxx') 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; + using package_name = project_name; + + struct dependency + { + package_name name; + string constraint; + }; + + using dependencies = std::map; 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), -- cgit v1.1