Revert "Use `--static-swift-stdlib` for easier distribution on Linux (#343)"
This reverts commit 78d023587c.
As reported previously:
> after adding --static-swift-stdlib, carton init and other commands started hanging.
> It seems something wrong in Foundation or global executor. The min repro for the hang is here
> https://gist.github.com/kateinoigakukun/a3ee55fa2480a46959211c53de862131
In theory, this should allow us to distribute self-contained binaries on Linux. These wouldn't be statically linked completely, but at least they should no longer depend on a separate dynamic library file with Swift stdlib.
Related to https://github.com/swiftwasm/carton/issues/336.
We were reading custom `index.html` only once on launch, which meant people had to restart `carton dev` every time they've updated `index.html` during the build process to see changes they've made.
* 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
There are issues with binding 0.0.0.0 address on macOS 12, I'm dropping the corresponding argument from tests in f24d39e8f8. Also seeing issues with Ubuntu 18.04, even though all tests seem to be passing. Dropping it as an old version from CI as well.
This makes our codebase smaller by ~80 lines and arguably more readable. Also removes OpenCombine dependency.
* Use `async`/`await` and actors instead of Combine
* Remove OpenCombine dependency
* Fix progress animation not updated
* Stop building with Swift 5.4, clean up terminal output
* Update requirements in `README.md`
* Add `description` to `InvalidResponseCode`
* Fix Linux build error
* Rename `main.swift` to `Main.swift`
* Work around IR/TDB warnings
* Pass IR/TDB arguments correctly to `swift build`
* Support `async` process runner in `carton-release`
* Use Xcode 13.2.1 on macOS
* Pass TDB/IR flags to `swift test` as well
* Make `Install` command async
* Add doc comments, handle subsequent rebuilds
This makes it possible to test latest `carton` Docker builds from the `main` branch.
* Attempt to push Docker image in `swift.yml`
* Update swift.yml
* Update swift.yml
* Push only a single tag
* Use secrets.PAT for GHCR login
* Move nightly tags to separate `docker.yml` workflow
* Rename `nightly` to `main`
I've dropped support for Swift 5.2, and SwiftLint now requires Xcode 12.5.1, which is unavailable on macOS 10.15 with GitHub Actions. This makes it impossible to test with Swift 5.3 on CI, so I'm bumping the required version to Swift 5.4.
Resolves https://github.com/swiftwasm/carton/issues/262.
* Update dependencies, add support for SwiftWasm 5.5
* Bump dependencies in `.github/workflows/swift.yml`
* Add explicit dependency on `NIOFoundationCompat`
* Lower Splash version to 0.15 for Swift 5.3 compat
* Update DefaultToolchain.swift
* Update swift.yml
* Revert "Lower Splash version to 0.15 for Swift 5.3 compat"
This reverts commit 6e04a7f158.
* Require Swift 5.4 in `Package.swift`
* Update README.md
* Use older 5.5 snapshot, unblock tests on failure
* Update DefaultToolchain.swift
* Select correct CPU architecture when downloading
* Disable hanging test
* Use latest 5.5 toolchain
* Use 2021-11-16 snapshot of SwiftWasm 5.5
* Add missing linker flags, re-enable browser test
* Address PR feedback
* 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
Previously, the file we need to include with the build to enable the stack overflow sanitizer was written as a temporary file. This didn't happen though on watcher rebuilds with `carton dev` and caused crashes when a code line containing `try!` relying on this file to be present was executed.
I think it's easier and more efficient to bundle this file in the `static.zip` file that already includes our JS entrypoints. We require `static.zip` to be downloaded and unpacked successfully into `~/.carton/static` before every build anyway. It makes more sense to sense the sanitizer file in `~/.carton/static/so_sanitizer.wasm` and use that instead writing and deleting it at a temporary path on every build.
I've also updated the JSKit dependency and cleaned up some linter warnings by moving large tuple values into a separate `BuildDescription` type.
This fixes the issue with Linux builds, as Linux CI hosts were updated to Swift 5.4 which no longer supports testing with release builds.
* Avoid building in `release` mode when testing
* Remove deprecated `LinuxMain.swift`
* Add host argument to dev and test commands
* Delete Brewfile.lock.json
* Update swift.yml
* Update Sources/CartonCLI/Commands/Dev.swift
Co-authored-by: Max Desiatov <max@desiatov.com>
* Update Sources/CartonCLI/Commands/Test.swift
Co-authored-by: Max Desiatov <max@desiatov.com>
Co-authored-by: Max Desiatov <max@desiatov.com>
* Added test command test with no arguments
* Changed build and test to release configuration, Fixed Docker Build error
* Changed build and test to release configuration, Fixed Docker Build error
* Fixed github action
* Moved package.json and package-lock.json back to the top directory
* Moved the entrypoint folder back to the top level directory
Co-authored-by: thecb4 <cavelle@tehcb4.io>
* 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>
* Added Dev tests and fixed hard coded paths, fixes#183
* Fixed Path dependency in 5.2 Package
* Removed mxcl/Path dependency
* Removed mxcl/Path dependency, Added confirmation of file existence in Init test
* Added sdk install head of init command test
* Moved carton sdk install to static setup method for tests
* Moved carton sdk install to static setup method for tests
* Moved carton sdk install to static setup method for tests
* Moved carton sdk install to static setup method for tests
* Moved carton sdk install to static setup method for tests
* changed order of actions for github automations to support testing
* modified test run to exclude release
* changed sdk install to run per test
* adjusted github workflows to create carton sdk folders
* adjusted github workflows to use /home/runner instead of root
* adjusted test to wait for sdk installation
* adjusted ubuntu tests for passing
* adjusted Dockerfile to run tests
* added tmate session for debugging
* Removed tmate session, added directory creation for carton sdk and sym link
* Adjusted order of commands for runner
* Fixed mkdir from worker to runner
* Added more terminal output for debugging
* Added more terminal output for debugging
* Added more terminal output for debugging
* Added more terminal output for debugging
* Added more terminal output for debugging
* Fixed hard coded paths
* Removed test investigation fixtures
* Removed test investigation fixtures
Co-authored-by: thecb4 <cavelle@tehcb4.io>