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: Delete the Package.swift in AWSClientRuntime/ #621

Merged
merged 10 commits into from
Sep 27, 2022

Conversation

jbelkins
Copy link
Contributor

@jbelkins jbelkins commented Sep 22, 2022

Description of changes

Delete the Package.swift in the AWSClientRuntime/ subdirectory & move its function to the main Package.swift.

The AWSClientRuntime library is now available only as a product published by this package's main Package.swift.

This will simplify the package definitions in this project, and allow for editing of AWSClientRuntime source files from within Xcode.

New/existing dependencies impact assessment, if applicable

No new dependencies were added to this change.

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

@jbelkins
Copy link
Contributor Author

As a retest, I re-generated the releases/ folder from this branch, then integrated the SDK into a CLI application. It built and ran as expected.

@@ -70,7 +70,7 @@ func appendLibTarget(name: String, path: String) {
),
.product(
name: "AWSClientRuntime",
package: "AWSClientRuntime"
package: "AWSSwiftSDK"
Copy link
Contributor

Choose a reason for hiding this comment

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

this seems incorrect. Why AWSSwiftSDK is not defined as package.

Copy link
Contributor Author

@jbelkins jbelkins Sep 23, 2022

Choose a reason for hiding this comment

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

This is indeed correct.

Instead of being a product published from its own package, i.e. package=AWSClientRuntime & product=AWSClientRuntime, AWSClientRuntime is now a product published from the AWSSwiftSDK package, i.e. package=AWSSwiftSDK and product=AWSClientRuntime.

This is similar to how the service clients are products published by the AWSSwiftSDK package. The only difference here is that AWSClientRuntime is not auto-generated.

As proof that this configuration is correct, if you generate files and run swift test from within the codegen/ directory, it resolves dependencies & runs tests successfully.

Copy link
Contributor

Choose a reason for hiding this comment

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

awesome, thanks for verifying it.

@@ -99,11 +99,11 @@ if let smithySwiftDir = ProcessInfo.processInfo.environment["SMITHY_SWIFT_CI_DIR
let sdkDir = ProcessInfo.processInfo.environment["AWS_SDK_SWIFT_CI_DIR"] {
package.dependencies += [
.package(name: "ClientRuntime", path: smithySwiftDir),
.package(name: "AWSClientRuntime", path: "\(sdkDir)/AWSClientRuntime"),
.package(name: "AWSSwiftSDK", path: sdkDir),
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See my comment above, this package dependency is correct.

@jbelkins jbelkins requested a review from ganeshnj September 23, 2022 16:51
@jbelkins
Copy link
Contributor Author

@ganeshnj Please re-review in light of my comments

@jbelkins jbelkins merged commit 610e25d into main Sep 27, 2022
@jbelkins jbelkins deleted the jbe/delete_aws_client_runtime_package_swift branch September 27, 2022 14:39
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