-
Notifications
You must be signed in to change notification settings - Fork 247
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
Conversation
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.
)}`, | ||
); | ||
for (const dep of this.packageDependencies) { | ||
code.line(`${JSII_RT_MODULE_NAME} v${VERSION}`); |
There was a problem hiding this comment.
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 CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
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 ifone 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.