The latest XCTest bundled in Swift SDK for Wasm requires `Bundle.main` access to
minimize behavior difference from other platforms. `Bundle.main`
requires `argv[0]` and file system access to get the main bundle path.
* Use JSKit runtime from SwiftPM resources
* Fix Node.js test runner
* Remove unused webpack npm packages
* Update Swift version in `.swiftformat`
* Fix browser and Node.js CJS/ESM handling
* Fix one of the tests, add CI time limit
* Use Tokamak `update-jskit` branch to fix tests
* Use latest Vapor with `.mjs` content-type fix
* Use dynamic import to detect JSKit presence
* Fix missing `runtimeConstructor` reference
* Update `StaticArchive.swift`
* Reduce the diff
* Address PR feedback
* Fix Node.js <-> JSKit integration test
* Update SwiftPM dependencies
* Fix comment typo in `testNode.js`
* Reuse `__stack_sanitizer` across entrypoints
Ideally we'd like to include new JSKit and SwiftWasm releases, but I think it makes more sense to wait for new JSKit release a bit more and to test things more thoroughly. Also, the watcher bug is still not fixed.
On the other hand, `--debug-info` has been highly requested by our users, so nothing prevents us from releasing 0.13.0 right now, and 0.14.0 with new JSKit/Tokamak and SwiftWasm 5.6 later.
`async-http-client` package is now pinned to 1.6.4, as 1.7.0 and later versions caused issues with toolchain downloads (see https://github.com/swift-server/async-http-client/issues/488 for more details).
I've also updated toolchain downloader code to bubble up download errors, which previously were hidden and made it very hard to diagnose these issues.
* Use SwiftWasm 5.5.0, bump version to 0.12.0
* Pin AHC to 1.8.0
* Pin AHC to 1.6.4, always remove downloaded archives
* Fix `defer` build issue
* Bump version to 0.11.0, update dependencies
* Test on Big Sur with Xcode 12.5
* Update test fixture dependencies
* Remove `LinuxMain.swift` expectations
* Test with `wasm-5.4-SNAPSHOT-2021-08-26-a`
* Remove expectations for `XCTestManifests.swift`
* Enable debugging output
* Try the latest 5.4 toolchain
* print debug output
* More debug output
* Test on macOS 11 with Xcode 13
* Pipe errors to stdout
* Update DefaultToolchain.swift
* Revert "Update DefaultToolchain.swift"
This reverts commit 4ff15f938a.
* Remove Xcode 13 from the CI matrix
* Update DefaultToolchain.swift
* Reduce the diff
* carton dev and bundle default command tests
* removed tests_output
* removed .testfile
* carton dev and bundle default command tests
* removed localhost as localURL
* attempt to fix folder name issue
* removed Fixtures test folder
* added Fixtures test folder
* attempt to fix folder name issue
* attempt to fix server connect issue
* fixed dev testWithNoArguments with sleep delay
* Debugging bundle command for github actions
* Install wasmr prior to swift test
* Debug clean up
* Debug clean up
* Update Tests/CartonCommandTests/CommandTestHelper.swift
Co-authored-by: Max Desiatov <max@desiatov.com>
Co-authored-by: thecb4 <cavelle@tehcb4.io>
Co-authored-by: Max Desiatov <max@desiatov.com>
Resolves https://github.com/swiftwasm/carton/issues/42.
Also updates JavaScriptKit dependency to 0.9.0.
* Demangle and print Firefox stacktraces in terminal
* Update the entrypoints archive URL, rename file
* Add missing newline to `ProcessRunner.swift`
* Remove redundant `console.log` call from `dev.js`
* Detect destination env from `User-Agent` header
* Silence linter in tests where it can't be avoided
* Add support for basic testing in browsers
* Add a browser message on finish, shut down server
* Update JavaScriptKit to 0.9.0
Other than a simple bump, we shouldn't check for the revision anymore. Now the recommended way to specify this dependency is only with a semantic version constraint.
Handling of the `static.zip` archive has changed slightly, where now the archive no longer has a nested `static` directory in it, which makes packaging slightly more predictable. For some reason passing wildcards to `zip` no longer works for me.
`dev.js` entrypoint has been updated to include the recent JavaScriptKit runtime fix: https://github.com/swiftwasm/JavaScriptKit/pull/19
I've also added a new subcommand to `carton-release`, which is now able to automaticallly create a new `static.zip` and record updated hashes in the source code. It still doesn't upload the archive automatically to previous release assets, but I wonder if that should be done manually anyway, at least until we have some kind of tests that verify the whole process end-to-end.
Additionally, since the new runtime is not compatible with the old Swift parts of JavaScriptKit, `carton dev` now checks the revision of JavaScriptKit that projects have specified in their `Package.swift`. It doesn't block the build process, but I hope it gives enough warning about the incompatibility.