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

Generate Package.swift during codegen #1222

Closed
2 tasks
Tracked by #695
jbelkins opened this issue Nov 13, 2023 · 1 comment
Closed
2 tasks
Tracked by #695

Generate Package.swift during codegen #1222

jbelkins opened this issue Nov 13, 2023 · 1 comment
Assignees
Labels
feature-request A feature should be added or improved.

Comments

@jbelkins
Copy link
Contributor

jbelkins commented Nov 13, 2023

Describe the feature

Note: this is a subtask of Modularization.

As the SDK is modularized, fine-grained decisions will need to be made about what packages are needed as dependencies for a given service within the SDK. For instance:

  • What AWS protocol does the service use? It might need to link in the XML or alternately the JSON serialization modules.
  • What auth schemes does it use? Different auth schemes might be modularized separately.
  • Does it use streaming? Checksums? DNS?
    (Several of these conditions are laid out in Smithy Reference Architecture's Modularization section.)

With the current Swift-based package manifest generator which runs after codegen is complete, it is impossible to determine these conditions easily since it does not integrate with Smithy and does not have access to Smithy model info. The Swift-based package manifest generator works okay when all services have the same dependencies, but does not have the necessary context once services have more customized dependency graphs.

The natural solution to this problem is to generate the Package.swift along with the other generated code, in the smithy-swift Kotlin project. (There is already code for generating Package.swift in the project that is currently unused; this may serve as a useful starting point.)

This should be used for generating the protocol test Package.swift as well.

Use Case

To support modularization of the SDK.

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change
@jbelkins jbelkins added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Nov 13, 2023
@jbelkins jbelkins mentioned this issue Nov 13, 2023
4 tasks
@jbelkins
Copy link
Contributor Author

GA milestone status of this task is tracked by the parent task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved.
Projects
None yet
Development

No branches or pull requests

2 participants