https://pulumi.com logo
#general
Title
# general
i

incalculable-diamond-5088

04/19/2019, 3:08 PM
Hi, I’m following https://github.com/pulumi/pulumi-tf-provider-boilerplate for datadog provider and when running
make ensure
getting
Copy code
ENSURE:
GO111MODULE=on go mod vendor
/bin/bash: gomod-doccopy: command not found
make: *** [ensure] Error 127
w

white-balloon-205

04/19/2019, 3:13 PM
Cc @stocky-spoon-28903 who has been making some changes recently here as part of move over to go modules.
i

incalculable-diamond-5088

04/19/2019, 3:59 PM
@white-balloon-205 @stocky-spoon-28903 Can it also be that the following error during
maker
is also related?
Copy code
WARN [runner/megacheck] Can't run megacheck because of compilation errors in packages [<http://github.com/pulumi/pulumi-datadog/sdk/go/datadog|github.com/pulumi/pulumi-datadog/sdk/go/datadog> <http://github.com/pulumi/pulumi-datadog/examples|github.com/pulumi/pulumi-datadog/examples> [<http://github.com/pulumi/pulumi-datadog/examples.test|github.com/pulumi/pulumi-datadog/examples.test>] <http://github.com/pulumi/pulumi-datadog/tests|github.com/pulumi/pulumi-datadog/tests> [<http://github.com/pulumi/pulumi-datadog/tests.test|github.com/pulumi/pulumi-datadog/tests.test>]]: sdk/go/datadog/datadogUser.go:80: invalid operation: cannot call non-function r.s.ID (variable of type *<http://github.com/pulumi/pulumi/sdk/go/pulumi.IDOutput|github.com/pulumi/pulumi/sdk/go/pulumi.IDOutput>) and 4 more errors: run `golangci-lint run --no-config --disable-all -E typecheck` to see all errors
sdk/go/datadog/datadogUser.go:80:9: invalid operation: cannot call non-function r.s.ID (variable of type *<http://github.com/pulumi/pulumi/sdk/go/pulumi.IDOutput|github.com/pulumi/pulumi/sdk/go/pulumi.IDOutput>) (typecheck)
	return r.s.ID()
	       ^
sdk/go/datadog/datadogUser.go:75:9: invalid operation: cannot call non-function r.s.URN (variable of type *<http://github.com/pulumi/pulumi/sdk/go/pulumi.URNOutput|github.com/pulumi/pulumi/sdk/go/pulumi.URNOutput>) (typecheck)
	return r.s.URN()
	       ^
tests/unit_test.go:31:2: cwd declared but not used (typecheck)
	cwd, err := os.Getwd()
	^
tests/unit_test.go:42:2: baseJS declared but not used (typecheck)
	baseJS := base.With(integration.ProgramTestOptions{
	^
resources.go:49:6: `makeDataSource` is unused (deadcode)
func makeDataSource(mod string, res string) tokens.ModuleMember {
     ^
resources.go:63:6: `boolRef` is unused (deadcode)
func boolRef(b bool) *bool {
     ^
resources.go:68:6: `stringValue` is unused (deadcode)
func stringValue(vars resource.PropertyMap, prop resource.PropertyKey) string {
     ^
resources.go:85:5: `managedByPulumi` is unused (deadcode)
var managedByPulumi = &tfbridge.DefaultInfo{Value: "Managed by Pulumi"}
    ^
make: *** [lint] Error 1
Specifically the
r.s.ID()
and
r.s.URN()
Seems like switching to go 1.12 fixed the issue
w

white-balloon-205

04/19/2019, 6:29 PM
Ahh - yes - the Go version requirement as moved to 1.12 as part of the modules work. I believe @stocky-spoon-28903 is looking into documentation updates to catch up with this.
s

stocky-spoon-28903

04/19/2019, 7:58 PM
Hi @incalculable-diamond-5088 - you also need go
go get <http://github.com/pulumi/scripts/gomod-doccopy|github.com/pulumi/scripts/gomod-doccopy>
from outside of a module directory
That will fix the first error.
Upgrading to Go 1.12 fixes the second - the dead code stuff may be correct (depending on which bits the provider uses)