From 721835d4dd0fe306e4b55d425f9360fac592eace Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 3 Dec 2017 13:58:28 +0200 Subject: Allow typification of variables and values across load generations The original semantics turned out to be too restrictive. For example, the user may have specified the config.c variable on the command line that is only used by an imported project that is loaded in a subsequent generation. We are also relaxing it for values since conceptually the two feel the same. For a value the (hypothetical) example is a "common" variable set in a project root that is only queried in a subdirectory in a subsequent generation. --- build2/context.hxx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'build2/context.hxx') diff --git a/build2/context.hxx b/build2/context.hxx index 5815f51..434b41f 100644 --- a/build2/context.hxx +++ b/build2/context.hxx @@ -41,13 +41,14 @@ namespace build2 // // Serial load can perform arbitrary changes to the model. Exclusive load, // however, can only perform "island appends". That is, it can create new - // "nodes" (variables, scopes, etc) but not change already existing nodes or - // invalidate any references to such (the idea here is that one should be - // able to load additional buildfiles as long as they don't interfere with - // the existing build state). The "islands" are identified by the - // load_generation number (0 for initial/serial load). It is incremented in - // case of a phase switch and is stored in various "nodes" (variables, etc) - // to allow modifications "within the islands". + // "nodes" (variables, scopes, etc) but not (semantically) change already + // existing nodes or invalidate any references to such (the idea here is + // that one should be able to load additional buildfiles as long as they + // don't interfere with the existing build state). The "islands" are + // identified by the load_generation number (0 for the initial/serial + // load). It is incremented in case of a phase switch and can be stored in + // various "nodes" to verify modifications are only done "within the + // islands". // extern run_phase phase; extern size_t load_generation; -- cgit v1.1