You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a part of our v6 release plans, we’d like to address several updates to the code generation tool. Some updates will be required as a part of other planned updates (e.g. async/await), others will improve the user experience and testability.
This discussion will currently serve as a draft proposal.
Design goals
Some initial design goals include:
Performance (large schemas currently take a long time to generate)
v6 Updates (to support new features)
Swift package integration (vs brew)
Performance
In order to determine appropriate work and focus to improve codegen performance we will first setup a test harness and performance benchmarks using XCTest.
This will improve the testability of the tool itself, while also enabling us to benchmark and profile the tool using Instruments. This should give us a clearer picture into where improvements can be made.
Swift package integation
Currently codegen requires installation via Homebrew, followed by running the tool via the commandline.
However since the tool itself is also a Swift command line application, we plan to explore options for enabling users to include the tool as a Swift Package (plugin) with some other additions to automate code-generation from inside Xcode itself.
Providing the option to include the package along with its codegen tool, could provide a better onboarding experience for new library consumers. Additionally for those that prefer an in-the-box solution, this could better serve the CI needs as well, ensuring no external tools/setup is required.
Note
Homebrew installations would continue to be supported since SPM is not always going to be the preferred setup.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Code Generation
Overview
As a part of our v6 release plans, we’d like to address several updates to the code generation tool. Some updates will be required as a part of other planned updates (e.g. async/await), others will improve the user experience and testability.
This discussion will currently serve as a draft proposal.
Design goals
Some initial design goals include:
brew
)Performance
In order to determine appropriate work and focus to improve codegen performance we will first setup a test harness and performance benchmarks using XCTest.
This will improve the testability of the tool itself, while also enabling us to benchmark and profile the tool using Instruments. This should give us a clearer picture into where improvements can be made.
Swift package integation
Currently codegen requires installation via Homebrew, followed by running the tool via the commandline.
However since the tool itself is also a Swift command line application, we plan to explore options for enabling users to include the tool as a Swift Package (plugin) with some other additions to automate code-generation from inside Xcode itself.
Providing the option to include the package along with its codegen tool, could provide a better onboarding experience for new library consumers. Additionally for those that prefer an in-the-box solution, this could better serve the CI needs as well, ensuring no external tools/setup is required.
Note
Homebrew installations would continue to be supported since SPM is not always going to be the preferred setup.
Beta Was this translation helpful? Give feedback.
All reactions