Skip to content

Commit 1e3a925

Browse files
hagaym1claude
andcommitted
feat: add shim package re-exporting the provider constructor
The provider implementation lives in internal/provider, which Go's module visibility rules make unimportable from outside this repository. Re-exporting New through a non-internal shim package lets external tooling embed the provider — in particular a Pulumi provider built on the Pulumi Terraform Bridge, which must construct the terraform-plugin-framework provider to generate a schema and language SDKs. No behavior change: shim.New returns exactly what main.go already passes to providerserver.Serve. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 1a7677f commit 1e3a925

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

shim/shim.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Package shim exposes the provider constructor to external Go modules.
2+
//
3+
// The provider implementation lives in internal/provider, which Go's module
4+
// visibility rules make unimportable from outside this repository. Re-exporting
5+
// New here lets external tooling embed the provider directly — in particular a
6+
// Pulumi provider built on the Pulumi Terraform Bridge, which must construct the
7+
// terraform-plugin-framework provider to generate its schema and language SDKs.
8+
package shim
9+
10+
import (
11+
"github.com/hashicorp/terraform-plugin-framework/provider"
12+
13+
internalprovider "github.com/cognitionai/terraform-provider-devin/internal/provider"
14+
)
15+
16+
// New returns the Devin provider constructor, identical to the one used by the
17+
// provider's own main entrypoint.
18+
func New(version string) func() provider.Provider {
19+
return internalprovider.New(version)
20+
}

0 commit comments

Comments
 (0)