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

fix!: Rename package to match name inferred from git URL #464

Merged
merged 16 commits into from
Nov 9, 2022

Conversation

jbelkins
Copy link
Contributor

@jbelkins jbelkins commented Nov 4, 2022

Issue #

Fixes awslabs/aws-sdk-swift#680

Description of changes

Change the declared name of this package to match its inferred name (i.e. the last path component of its Git URL, minus the extension). This is being performed in conjunction with similar renames of aws-sdk-swift and smithy-swift. A complete rationale for making this change is given in this PR.

This is a breaking change but consumers of this package simply need to update their Package.swift to refer to the package by the new name.

Specific changes:

  • Rename package from ClientRuntime to smithy-swift
  • Use new name & modern syntax when generating manifests

Scope

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

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

@jbelkins jbelkins marked this pull request as ready for review November 4, 2022 16:28
@@ -55,7 +55,7 @@ fun writePackageManifest(settings: SwiftSettings, fileManifest: FileManifest, de
writer.write("name: \"${settings.moduleName}Tests\",")
writer.openBlock("dependencies: [", "],") {
writer.write("\$S,", settings.moduleName)
writer.write(".product(name: \"SmithyTestUtil\", package: \"ClientRuntime\")")
Copy link
Contributor

Choose a reason for hiding this comment

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

I tried to open /Users/jangirg/Projects/Amplify/SwiftSDK/aws-sdk-swift/codegen/sdk-codegen/build/smithyprojections/sdk-codegen/accessanalyzer.2019-11-01/swift-codegen and it failed to resolve

❯ swift package resolve
error: 'swift-codegen': unknown package 'AWSClientRuntime' in dependencies of target 'AWSAccessAnalyzer'; valid packages are: 'smithy-swift', 'aws-sdk-swift'

Copy link
Contributor

Choose a reason for hiding this comment

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

Few things must be verified

  • Individual package build located at /Users/jangirg/Projects/Amplify/SwiftSDK/aws-sdk-swift/codegen/sdk-codegen/build/smithyprojections/sdk-codegen/{service}/swift-codegen
  • when packages are staged in release
  • opening aws-crt-swift in xcode
  • opening smityh-swift in xcode
  • opening aws-sdk-swift in xcode without staged changes
  • opening aws-sdk-swift in xcode with staged changes

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 broken Package.swift above is fixed in awslabs/aws-sdk-swift@f290fd4

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ganeshnj All the situations you described have been tested out. I generated a release then built out all services as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for testing. This is painful but needed until we have a better CI checks for such cases.

@jbelkins jbelkins merged commit 60de8a4 into main Nov 9, 2022
@jbelkins jbelkins deleted the jbe/package_rename branch November 9, 2022 14:41
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.

Rename packages to match names inferred from git URLs
2 participants