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 (
2424 "github.com/kyleconroy/sqlc/internal/plugin"
2525)
2626
27+ // This version must be updated whenever the wasmtime-go dependency is updated
28+ const wasmtimeVersion = `v0.38.1`
29+
2730func cacheDir () (string , error ) {
2831 cache := os .Getenv ("SQLCCACHE" )
2932 if cache != "" {
@@ -68,7 +71,8 @@ func (r *Runner) loadModule(ctx context.Context, engine *wasmtime.Engine) (*wasm
6871 }
6972
7073 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 )
7276 _ , staterr := os .Stat (modPath )
7377 if staterr == nil {
7478 data , err := os .ReadFile (modPath )
You can’t perform that action at this time.
0 commit comments