Skip to content

Commit

Permalink
Merge pull request #211 from wrapl/dev
Browse files Browse the repository at this point in the history
dev
  • Loading branch information
rajamukherji authored Jul 31, 2024
2 parents 189ed79 + e60971b commit 83e6d43
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
5 changes: 3 additions & 2 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
rabs (2.30.14) UNRELEASED; urgency=medium
rabs (2.31.0) UNRELEASED; urgency=medium

* Updates.
* Updates.
Expand Down Expand Up @@ -65,5 +65,6 @@ rabs (2.30.14) UNRELEASED; urgency=medium
* Updates.
* Updates.
* Updates.
* Updates.

-- Raja Mukherji <raja@hinano> Sat, 20 Jul 2024 23:52:10 +0100
-- Raja Mukherji <raja@hinano> Wed, 31 Jul 2024 08:38:18 +0100
2 changes: 1 addition & 1 deletion src/rabs.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ extern __thread target_t *CurrentTarget;
ml_value_t *rabs_global(const char *Name);
ml_value_t *rabs_ml_global(void *Data, const char *Name, const char *Source, int Line, int Mode);

#define CURRENT_VERSION 2, 30, 14
#define CURRENT_VERSION 2, 31, 0
#define MINIMAL_VERSION 2, 10, 0

#endif
10 changes: 9 additions & 1 deletion src/target.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,14 @@ ML_METHOD("depends", TargetT) {
return (ml_value_t *)Target->Depends;
}

ML_METHOD("cached_depends", TargetT) {
//<Target
//>targetset
// Returns the set of dependencies of :mini:`Target`.
target_t *Target = (target_t *)Args[0];
return (ml_value_t *)cache_depends_get(Target);
}

ML_METHOD("affects", TargetT) {
//<Target
//>targetset
Expand Down Expand Up @@ -638,6 +646,7 @@ static void target_update(target_t *Target) {
targetset_foreach(Scans, Target, (void *)target_graph_scans);
}
}
cache_depends_set(Target, Target->BuildDepends);
CurrentDirectory = OldDirectory;
CurrentContext = OldContext;
CurrentTarget = OldTarget;
Expand All @@ -660,7 +669,6 @@ static void target_update(target_t *Target) {
if (!LastUpdated || memcmp(Previous, Target->Hash, SHA256_BLOCK_SIZE)) {
Target->LastUpdated = CurrentIteration;
cache_hash_set(Target, FileTime);
cache_depends_set(Target, Target->BuildDepends);
} else {
Target->LastUpdated = LastUpdated;
cache_last_check_set(Target, FileTime);
Expand Down
3 changes: 2 additions & 1 deletion src/targetset.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ static void ML_TYPED_FN(ml_iter_key, TargetSetIterT, ml_state_t *Caller, targets
}

static void ML_TYPED_FN(ml_iter_value, TargetSetIterT, ml_state_t *Caller, targetset_iter_t *Iter) {
ML_CONTINUE(Caller, Iter->Current[0]);
target_t *Target = Iter->Current[0];
ML_CONTINUE(Caller, ml_string(Target->Id, Target->IdLength));
}

static void ML_TYPED_FN(ml_iter_next, TargetSetIterT, ml_state_t *Caller, targetset_iter_t *Iter) {
Expand Down

0 comments on commit 83e6d43

Please sign in to comment.