Skip to content

chore(interfaces): submodule names for interface submodules are incorrect#36036

Merged
mergify[bot] merged 1 commit intomainfrom
mrgrain/chore/fix-interfaces-go
Nov 13, 2025
Merged

chore(interfaces): submodule names for interface submodules are incorrect#36036
mergify[bot] merged 1 commit intomainfrom
mrgrain/chore/fix-interfaces-go

Conversation

@mrgrain
Copy link
Copy Markdown
Contributor

@mrgrain mrgrain commented Nov 13, 2025

Reason for this change

Go packaging was failing with

#STDERR> awsimagebuilder/internal/types.go:4:2: "github.com/aws/aws-cdk-go/awscdk/interfaces/awsimagebuilder" imported and not used
#STDERR> awsimagebuilder/internal/types.go:8:28: undefined: IComponentRef

However as it turns out the generated jsiirc were using the wrong path. They were missing the required . (fullstop) prefix, thus the written package names were not being considered by jsii at all.

For go, we also need to update the interfaces package name to a unique name:

Before:

package awsimagebuilder

After:

package interfacesawsimagebuilder

Description of changes

Use the correct jsiirc filename.
Ensure a unique package name for go is used.

Describe any new or updated permissions being added

n/a

Description of how you validated changes

Test pipeline is passing. Manually tested go packaging.

Checklist


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

@github-actions github-actions bot added the p2 label Nov 13, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team November 13, 2025 09:07
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Nov 13, 2025
@mrgrain mrgrain changed the title chore(interfaces): fix go package name for interfaces is incorrect chore(interfaces): submodule names for interface submodules are incorrect Nov 13, 2025
@mrgrain mrgrain marked this pull request as ready for review November 13, 2025 09:23
@mrgrain mrgrain requested review from rix0rrr and removed request for a team November 13, 2025 09:23
@mrgrain mrgrain added pr-linter/cli-integ-tested Assert that any CLI changes have been integ tested pr/request-cli-integ-tests Request CLI integ tests to be run. You will need to review the code and approve the deployment. labels Nov 13, 2025
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

just adding some comments for better understanding

const ns = `${interfacesModuleJsiiRc.targets[language][whatName]}.${lastPart(submodule.definition?.[k] ?? 'undefined')}`;
if (ns.includes('undefined')) {
throw new Error(`Could not build child namespace for language ${language} from ${JSON.stringify(interfacesModuleJsiiRc.targets[language])} and ${k} from ${JSON.stringify(submodule.definition)}`);
function combineLanguageNamespace(language: string, whatName: string, fromDef?: string) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this seemed overly complicated just to get the key name into the error message

const ns = `${interfacesModuleJsiiRc.targets[language][whatName]}.${lastPart(submodule.definition?.[k] ?? 'undefined')}`;
if (ns.includes('undefined')) {
throw new Error(`Could not build child namespace for language ${language} from ${JSON.stringify(interfacesModuleJsiiRc.targets[language])} and ${k} from ${JSON.stringify(submodule.definition)}`);
function combineLanguageNamespace(language: string, whatName: string, fromDef?: string) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Okay better :)

@mrgrain mrgrain force-pushed the mrgrain/chore/fix-interfaces-go branch from 13d332a to 11ade54 Compare November 13, 2025 09:30
@mrgrain mrgrain added the pr/do-not-merge This PR should not be merged at this time. label Nov 13, 2025
@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

➡️ PR build request submitted to test-main-pipeline ⬅️

A maintainer must now check the pipeline and add the pr-linter/cli-integ-tested label once the pipeline succeeds.

@mrgrain mrgrain removed the pr/do-not-merge This PR should not be merged at this time. label Nov 13, 2025
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Nov 13, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 96d4e81 into main Nov 13, 2025
30 of 32 checks passed
@mergify mergify bot deleted the mrgrain/chore/fix-interfaces-go branch November 13, 2025 10:29
@github-actions
Copy link
Copy Markdown
Contributor

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

contribution/core This is a PR that came from AWS. p2 pr/request-cli-integ-tests Request CLI integ tests to be run. You will need to review the code and approve the deployment. pr-linter/cli-integ-tested Assert that any CLI changes have been integ tested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants