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

newS3Bucket Go SDK Fails Compile #3718

Closed
crayon-sr opened this issue Aug 30, 2024 · 2 comments
Closed

newS3Bucket Go SDK Fails Compile #3718

crayon-sr opened this issue Aug 30, 2024 · 2 comments
Labels
bug Something isn't working new Un-triaged issue

Comments

@crayon-sr
Copy link

Expected Behavior

No duplicate interfaces in autogenerated SDK

Actual Behavior

Cannot create a bucket, with following error.

go/pkg/mod/github.com/cdktf/cdktf-provider-aws-go/aws/[email protected]/s3bucket/s3bucket_S3Bucket.go:14:2: duplicate method Count go/pkg/mod/github.com/cdktf/cdktf-provider-aws-go/aws/[email protected]/s3bucket/s3bucket_S3Bucket.go:41:2: other declaration of Count go/pkg/mod/github.com/cdktf/cdktf-provider-aws-go/aws/[email protected]/s3bucket/s3bucket_S3Bucket.go:14:2: duplicate method SetCount go/pkg/mod/github.com/cdktf/cdktf-provider-aws-go/aws/[email protected]/s3bucket/s3bucket_S3Bucket.go:43:2: other declaration of SetCount

Steps to Reproduce

package main

import (
	"github.com/aws/constructs-go/constructs/v10"
	"github.com/aws/jsii-runtime-go"
	"github.com/cdktf/cdktf-provider-aws-go/aws/v10/s3bucket"

	"github.com/hashicorp/terraform-cdk-go/cdktf"
)

func NewMyStack(scope constructs.Construct, id string) cdktf.TerraformStack {
	stack := cdktf.NewTerraformStack(scope, &id)

	s3bucket.NewS3Bucket(scope, jsii.String("my-bucket"),
		&s3bucket.S3BucketConfig{})

	return stack
}

func main() {
	app := cdktf.NewApp(nil)
	NewMyStack(app, "my-bucket")
	app.Synth()
}```

### Versions

language: go
cdktf-cli: 0.20.8
node: v22.5.1
cdktf: 0.20.8
constructs: 10.3.0
jsii: 1.98.0
terraform: 1.9.5
arch: arm64
os: darwin 23.6.0
go: go version go1.22.5 darwin/arm64
providers
github.com/cdktf/cdktf-provider-aws-go/aws (PREBUILT)
        terraform provider version: 4.39.0 
        prebuilt provider version: 10.0.12
        cdktf version: ^0.13.0

### Providers

┌───────────────┬──────────────────┬─────────┬────────────┬────────────────────────────────────────────┬─────────────────┐
│ Provider Name │ Provider Version │ CDKTF   │ Constraint │ Package Name                               │ Package Version │
├───────────────┼──────────────────┼─────────┼────────────┼────────────────────────────────────────────┼─────────────────┤
│ aws           │ 4.39.0           │ ^0.13.0 │            │ github.com/cdktf/cdktf-provider-aws-go/aws │ 10.0.12         │
└───────────────┴──────────────────┴─────────┴────────────┴────────────────────────────────────────────┴─────────────────┘

### Gist

_No response_

### Possible Solutions

Something about embedded interfaces in Go, I am not very familiar with the language. 

### Workarounds

Comment out the overlapping method definitions in the s3bucket_S3Bucket.go S3Bucket interface, and comment out the func defintions.

### Anything Else?

_No response_

### References

_No response_

### Help Wanted

- [ ] I'm interested in contributing a fix myself

### Community Note

- Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
@crayon-sr crayon-sr added bug Something isn't working new Un-triaged issue labels Aug 30, 2024
@crayon-sr
Copy link
Author

Ignore tutorial requirements and bump versions from go.mod located here.

Copy link
Contributor

github-actions bot commented Oct 2, 2024

I'm going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working new Un-triaged issue
Projects
None yet
Development

No branches or pull requests

1 participant