commit 2a3bba8623e3c7c5f874ab429bbd278c760bb223
parent 554a40c042084f92da0d91913466c64c125cd546
Author: Drew DeVault <sir@cmpwn.com>
Date: Tue, 6 Sep 2022 12:03:48 +0200
hare::module: fix false cache busts
The end of this loop checks for any extra tokens in the tokenizer and
assumes it's an invalid manifest, busting the cache unnecessarily.
Signed-off-by: Drew DeVault <sir@cmpwn.com>
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/hare/module/manifest.ha b/hare/module/manifest.ha
@@ -254,6 +254,9 @@ export fn manifest_load(ctx: *context, ident: ast::ident) (manifest | error) = {
// Implementation detail: tags always follows module
// directive for a given module version
assert(found);
+
+ // Drain tokenizer
+ for (strings::next_token(&tok) is str) void;
case =>
return manifest;
};