Skip to content

Commit

Permalink
fix(wasm): Move Runner struct to shared file (#2725)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyleconroy authored Sep 11, 2023
1 parent 79c58b7 commit 79cb8b5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
7 changes: 1 addition & 6 deletions internal/ext/wasm/nowasm.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,12 @@
package wasm

import (
"fmt"
"context"
"fmt"

"github.com/sqlc-dev/sqlc/internal/plugin"
)

type Runner struct {
URL string
SHA256 string
}

func (r *Runner) Generate(ctx context.Context, req *plugin.CodeGenRequest) (*plugin.CodeGenResponse, error) {
return nil, fmt.Errorf("sqlc built without wasmtime support")
}
7 changes: 7 additions & 0 deletions internal/ext/wasm/runner.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package wasm

type Runner struct {
URL string
SHA256 string
Env []string
}
6 changes: 0 additions & 6 deletions internal/ext/wasm/wasm.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ func cacheDir() (string, error) {
return filepath.Join(cacheHome, "sqlc"), nil
}

type Runner struct {
URL string
SHA256 string
Env []string
}

var flight singleflight.Group

// Verify the provided sha256 is valid.
Expand Down

0 comments on commit 79cb8b5

Please sign in to comment.