Cyclic dependency issue observed for Go
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 267
- Avg merge
- 1d 25m
- Merged PRs (30d)
- 14
Description
### Describe the bug
CDK CLI integration test suite fails for go: https://github.com/aws/aws-cdk-cli/blob/main/packages/%40aws-cdk-testing/cli-integ/tests/init-go/init-go.integtest.ts
Based on failure logs, the issue is due to cyclic dependency, where we observed failure for `init go sample-app` with error:
```
package cdk-integ-0p5dbsi4jjjf
--
188 | imports github.com/aws/aws-cdk-go/awscdk/v2/awssnssubscriptions
189 | imports github.com/aws/aws-cdk-go/awscdk/v2/awskinesisfirehose
190 | imports github.com/aws/aws-cdk-go/awscdk/v2/awsec2
191 | imports github.com/aws/aws-cdk-go/awscdk/v2/awskinesisfirehose: import cycle not allowed
```
This issue has been observed only for go, and was introduced with this PR https://github.com/aws/aws-cdk/pull/33883.
### Regression Issue
- [ ] Select this option if this issue appears to be a regression.
### Expected Behavior
Like the other languages, go should also be able to handle and work around such cyclic dependencies.
### Current Behavior
Integ test for go fails with the following error:
```
package cdk-integ-0p5dbsi4jjjf
--
188 | imports github.com/aws/aws-cdk-go/awscdk/v2/awssnssubscriptions
189 | imports github.com/aws/aws-cdk-go/awscdk/v2/awskinesisfirehose
190 | imports github.com/aws/aws-cdk-go/awscdk/v2/awsec2
191 | imports github.com/aws/aws-cdk-go/awscdk/v2/awskinesisfirehose: import cycle not allowed
```
### Reproduction Steps
Merge this PR: [#33883](https://github.com/aws/aws-cdk/pull/33883) that introduces cyclic dependency and run the cdk cli integration tests for go.
### Possible Solution
_No response_
### Additional Information/Context
_No response_
### SDK version used
CLI Version: 2.1018.0, JSII: 1.112.0
### Environment details (OS name and version, etc.)
Code pipeline (Linux)
Contributor guide
Research direction
Start with packages/@aws-cdk-testing/cli-integ/tests/init-go/init-go.integtest.ts and reproduce the failure by running the Go CDK CLI integration test after applying PR #33883. Trace the reported awssnssubscriptions, awskinesisfirehose, and awsec2 import cycle, then verify that the Go sample-app integration test completes like the other language tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, typescript
- Domain
- cli, testing, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100