Skip to content

SDK requires CGO even without using Desktop App Integration #260

@kimdre

Description

@kimdre

Scenario & Reproduction Steps

I'm using the SDK without the desktop app integration. Since onepassword SDK v0.4.0 I cannot build my Go app anymore when CGO_ENABLED=0.
I did not make any changes to my code other than updating the dependency version for the 1password SDK in my go mod file.
Using the onepassword SDK v0.3.1 works fine.

Actual Behavior

Building my Go app fails with this lines

#19 113.3 # github.com/1password/onepassword-sdk-go
#19 113.3 /go/pkg/mod/github.com/1password/onepassword-sdk-go@v0.4.0/client_builder_no_cgo.go:7:10: undefined: ERROR_WithDesktopAppIntegration_requires_CGO_To_Cross_Compile_See_README_CGO_Section

However, I don't use the desktop app integration at all:

client, err := onepassword.NewClient(
	ctx,
	onepassword.WithServiceAccountToken(accessToken),
	onepassword.WithIntegrationInfo("doco-cd", version),
)
if err != nil {
	return nil, err
}

Expected Behavior

No response

SDK version

v0.4.0

Additional information

Using the onepassword SDK v0.3.1 works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working as expected. Has never worked before. When it has, use "regression" instead.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions