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
At the current moment, the possibilities for Swift development experience on OpenWhisk are wide open. Let's use this issue to discuss the right approach to make developing OpenWhisk artifacts in Swift a good experience for our users.
Whatever specific decisions are made, I think we should keep in mind the following ideals:
Allow for use of standard development tools, including Xcode and the Swift CLI.
User code should compile cleanly on their development machine (not just in the OW Swift runtime).
Some amount of unit testing should be possible on the user's development machine.
User should be able to develop multiple OW artifacts (say, all artifacts within a OW package) in the same Swift package/Xcode target.
The development experience should be comparable regardless of the platform the developer is using to write their code.
It may not be possible to achieve all of these ideals in the final experience, and so compromise should be carefully considered.
The text was updated successfully, but these errors were encountered:
Proposal: Actions must declare a global main function
The obvious advantage of this approach is simplicity. The action developer gets to see exactly what is expected of them, and the OW runtime knows exactly what code to invoke to run the action:
This advantage extends even to having the types of the args object and the expected return type plainly visible to the action developer.
The disadvantage to this approach is that it violates our goals of using standard tools and developing multiple OW artifacts in the same Swift package or Xcode target. If you have multiple files declaring this global main function, the swift compiler will complain that you are trying to redefine a global function.
At the current moment, the possibilities for Swift development experience on OpenWhisk are wide open. Let's use this issue to discuss the right approach to make developing OpenWhisk artifacts in Swift a good experience for our users.
Whatever specific decisions are made, I think we should keep in mind the following ideals:
It may not be possible to achieve all of these ideals in the final experience, and so compromise should be carefully considered.
The text was updated successfully, but these errors were encountered: