Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(wasm): Move Runner struct to shared file #2725

Merged
merged 1 commit into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading