aboutsummaryrefslogtreecommitdiffhomepage
path: root/interp
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2021-12-09 19:37:13 +0100
committerNia <[email protected]>2021-12-28 18:29:05 -0500
commit3e109fca5f289f5e97548f061d7e0e24c9727193 (patch)
tree4ebb81cdee9d11f98cd22435a90ba0a15082f302 /interp
parent763a86cd8ebbc85b721cb945e7acf19d5e0b7ace (diff)
downloadtinygo-3e109fca5f289f5e97548f061d7e0e24c9727193.tar.gz
tinygo-3e109fca5f289f5e97548f061d7e0e24c9727193.zip
builder: use build ID as cache key
Instead of storing an increasing version number in relevant packages (compiler.Version, interp.Version, cgo.Version, ...), read the build ID from the currently running executable. This has several benefits: * All changes relevant to the compiled packages are caught. * No need to bump the version for each change to these packages. This avoids merge conflicts. * During development, `go install` is enough. No need to run `tinygo clean` all the time. Of course, the drawback is that it might be updated a bit more often than necessary but I think the overall benefit is big. Regular release users shouldn't see any difference. Because the tinygo binary stays the same, the cache works well.
Diffstat (limited to 'interp')
-rw-r--r--interp/interp.go6
1 files changed, 0 insertions, 6 deletions
diff --git a/interp/interp.go b/interp/interp.go
index 78896179e..3f5e9e506 100644
--- a/interp/interp.go
+++ b/interp/interp.go
@@ -11,12 +11,6 @@ import (
"tinygo.org/x/go-llvm"
)
-// Version of the interp package. It must be incremented whenever the interp
-// package is changed in a way that affects the output so that cached package
-// builds will be invalidated.
-// This version is independent of the TinyGo version number.
-const Version = 2 // last change: fix GEP on untyped pointers
-
// Enable extra checks, which should be disabled by default.
// This may help track down bugs by adding a few more sanity checks.
const checks = true