You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/02/04 07:07:01 UTC

[GitHub] csantanapr commented on issue #10: Remove redundant file names from exclusion list.

csantanapr commented on issue #10: Remove redundant file names from exclusion list.
URL: https://github.com/apache/incubator-openwhisk-runtime-swift/pull/10#issuecomment-362885999
 
 
   Interesting use case @jthomas 
   We have not documented, or supported this use case, of having a source file inside a zip.
   It's always being for swift that you have two main use cases we support and have tests.
   1. create action with a single source file like `hello.swift` or `main.swift` no zip
   2. pre-compile you swift code so it's faster cold start, no need to compile on /init, for this case you would include the executable inside the zip located in `.build/release/Action` I added a help compile script to compile and build the zip https://github.com/apache/incubator-openwhisk-runtime-swift/blob/master/tools/build/compile.sh
   
   I think we should take a look at supporting a 3rd case, as a convenience.
   Allow you to upload a zip with the expected directory structure for swift 4 including dependencies
   contents of zip:
   ```
   ./Package.swift
   ./Sources
   ./Sources/main.swift
   ./Sources/AnotherFile.swift
   ```
   and the epilogue will detect which of the 3 use cases it is and optimize for that one. 
   Above we don't want to loose all the optimization we did.
   This will allow you for some cases as a convenience for folks just getting started and kicking the tires to include a Package.swift that pulls some dependencies.
   
   The problem is that if people really use this for production, or don't go the next step to pre-compile they are stuck with a bad experience, it's easy but the latency on cold start sucks.
   
   Let me know what you think
   
   I propose we open an new issue to discuss scenario or specifying full source zip with dependency declaration with Package.swift
   
   For this PR, just add a simple test case for swift4 with fixture zip file that has a main.swift inside.
   Test fixture https://github.com/apache/incubator-openwhisk-runtime-swift/tree/master/tests/dat/build/swift4/mainSwiftFile.zip
   And add test in https://github.com/apache/incubator-openwhisk-runtime-swift/blob/master/tests/src/test/scala/actionContainers/Swift4ActionContainerTests.scala#L93

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services