File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,9 @@ import (
24
24
"github.com/kyleconroy/sqlc/internal/plugin"
25
25
)
26
26
27
+ // This version must be updated whenever the wasmtime-go dependency is updated
28
+ const wasmtimeVersion = `v0.38.1`
29
+
27
30
func cacheDir () (string , error ) {
28
31
cache := os .Getenv ("SQLCCACHE" )
29
32
if cache != "" {
@@ -68,7 +71,8 @@ func (r *Runner) loadModule(ctx context.Context, engine *wasmtime.Engine) (*wasm
68
71
}
69
72
70
73
pluginDir := filepath .Join (cache , expected )
71
- modPath := filepath .Join (pluginDir , fmt .Sprintf ("plugin_%s_%s.module" , runtime .GOOS , runtime .GOARCH ))
74
+ modName := fmt .Sprintf ("plugin_%s_%s_%s.module" , runtime .GOOS , runtime .GOARCH , wasmtimeVersion )
75
+ modPath := filepath .Join (pluginDir , modName )
72
76
_ , staterr := os .Stat (modPath )
73
77
if staterr == nil {
74
78
data , err := os .ReadFile (modPath )
You can’t perform that action at this time.
0 commit comments