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

feat(go): emit indirect dependencies in go.mod #2596

Merged
merged 2 commits into from
Feb 23, 2021

Conversation

RomainMuller
Copy link
Contributor

This helps IDEs (eg: GoLand from JetBrains, etc..) be more comfortable
with the codebase, as indirect dependencies are correctly mapped. This
generates code more in line with what go mod would have generated if
one had tried to manually generate those packages.

This was manually confirmed to have a fully working experience in GoLand,
where even generated code modules are completely browsable, compiling,
and IntelliSense-able in this configuration; while previously it would be
unable to build and check the generated code, resulting in an extremely
poor experience (with UIs jumping around as the IDE failed to resolve modules).


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

This helps IDEs (eg: GoLand from JetBrains, etc..) be more comfortable
with the codebase, as indirect dependencies are correctly mapped. This
generates code more in line with what `go mod` would have generated if
one had tried to manually generate those packages.
@RomainMuller RomainMuller added language/go Regarding GoLang bindings feature-request A feature should be added or improved. effort/small Small work item – less than a day of effort contribution/core This is a PR that came from AWS. labels Feb 23, 2021
@RomainMuller RomainMuller requested a review from a team February 23, 2021 13:25
@RomainMuller RomainMuller self-assigned this Feb 23, 2021
)}`,
);
for (const dep of this.packageDependencies) {
code.line(`${JSII_RT_MODULE_NAME} v${VERSION}`);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous code was actually incorrect - the version of the jsii runtime to link against must correspond to the version of jsii-pacmak that generated the code, NOT the version of jsii that created the assembly.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-6Jw05QLuWWwe
  • Commit ID: 29db85c
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@RomainMuller RomainMuller merged commit 0f95a0b into main Feb 23, 2021
@RomainMuller RomainMuller deleted the rmuller/go-indirect-dependencies branch February 23, 2021 15:05
This was referenced Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS. effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. language/go Regarding GoLang bindings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants