Skip to content

Conversation

smilkuri
Copy link
Contributor

@smilkuri smilkuri commented Oct 6, 2025

Issue

Internal JS-6275

Description

Fix implicit dependency error and duplicate files in smithy-aws-typescript-codegen

  • Add explicit dependsOn for set-aws-sdk-versions task
  • Set duplicatesStrategy to EXCLUDE for META-INF files

Testing

Locally

./gradlew :smithy-aws-typescript-codegen:publish
Calculating task graph as configuration cache cannot be reused because file 'build.gradle.kts' has changed.

BUILD SUCCESSFUL in 2s
10 actionable tasks: 5 executed, 5 up-to-date
Configuration cache entry stored.

Checklist

  • [n/a] If the PR is a feature, add integration tests (*.integ.spec.ts).
  • [n/a] If you wrote E2E tests, are they resilient to concurrent I/O?
  • [n/a] If adding new public functions, did you add the @public tag and enable doc generation on the package?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@smilkuri smilkuri requested a review from a team as a code owner October 6, 2025 23:20
archiveClassifier.set("sources")
// Add explicit dependency on the task that generates resources
dependsOn("set-aws-sdk-versions")
duplicatesStrategy = DuplicatesStrategy.INCLUDE
Copy link
Member

Choose a reason for hiding this comment

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

Using INCLUDE also seems to retain the file contents

$ codegen> jar xvf build/staging/software/amazon/smithy/typescript/smithy-aws-typescript-codegen/0.36.1/smithy-aws-typescript-codegen-0.36.1.jar

$ codegen> head -n5 META-INF/services/software.amazon.smithy.typescript.codegen.integration.TypeScriptIntegration 
software.amazon.smithy.aws.typescript.codegen.AddEndpointsV2ParameterNameMap
software.amazon.smithy.aws.typescript.codegen.AddAwsRuntimeConfig
software.amazon.smithy.aws.typescript.codegen.AddAccountIdEndpointModeRuntimeConfig
software.amazon.smithy.aws.typescript.codegen.AddBuiltinPlugins
software.amazon.smithy.aws.typescript.codegen.AddServiceCustomizationPlugins

Copy link
Member

Choose a reason for hiding this comment

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

As per the documentation and published artifacts on 0.36.0, the duplicates strategy should be INCLUDE

Docs: https://docs.gradle.org/current/javadoc/org/gradle/api/file/DuplicatesStrategy.html
Artifacts in 0.36.0: #7409 (comment)

@smilkuri smilkuri merged commit d14be42 into main Oct 7, 2025
8 checks passed
@smilkuri smilkuri deleted the add-dependency branch October 7, 2025 00:34
@trivikr
Copy link
Member

trivikr commented Oct 7, 2025

The duplicate strategy was changed to INCLUDE in #7410, after codegen release failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants