aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/context.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-04-15 10:41:40 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-04-15 10:41:40 +0200
commit642d2f1d3f83e3f5e303cf75b9a9d0a563e4ada4 (patch)
treefdb34bb27c6ff9de456ee899529ccad865423340 /libbuild2/context.hxx
parent65fadc6003259719161be650d2ede16c30e0bb3b (diff)
Omit unnecessary clearing of cached base_scope values
Diffstat (limited to 'libbuild2/context.hxx')
-rw-r--r--libbuild2/context.hxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/libbuild2/context.hxx b/libbuild2/context.hxx
index 5cc2115..9083556 100644
--- a/libbuild2/context.hxx
+++ b/libbuild2/context.hxx
@@ -248,7 +248,12 @@ namespace build2
// "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".
+ // "within the islands". Another example of invalidation would be
+ // insertion of a new scope "under" an existing target thus changing its
+ // scope hierarchy (and potentially even its base scope). This would be
+ // bad because we may have made decisions based on the original hierarchy,
+ // for example, we may have queried a variable which in the new hierarchy
+ // would "see" a new value from the newly inserted scope.
//
run_phase phase = run_phase::load;
size_t load_generation = 0;