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
* Refactoring the use of `DestinationEnvironment` and `Environment`
`Environment` shouldn't specify the concrete environment, but the type
of environments enough for build planning.
* Lower i64 imports only for WASI oriented things
### 🎩 What is the goal?
Implement NodeJS as another test runner.
### 📄 How is it being implemented?
In this PR, I include the following changes:
- Create an abstraction for the different Test Runners (Wasmer, browser and now Node)
- Implement the new Node test runner (quite similar to the Wasmer one)
- Unify Javascript client code, so we can make sure we apply the same patches and load in the same way all the different targets
- Create a new entry point for testing with node
- Add that new entry point to the static bundle
### 👀 Any consideration?
The Node test runner does not use the TestsParser as it heavily impacts execution time. I will try to figure out what's going on later.
### ✅ How can it be tested?
Testing is automated 🤖 . You can also check this in your own project by running:
```bash
carton test --environment node
```
Resolves https://github.com/swiftwasm/carton/issues/175.
I initially thought we should parse `Package.swift` manifests of the whole dependency tree to collect paths to resources from them, but now I'm not even sure that SwiftPM provides an API for this.
Much simpler solution is to serve with `dev` and copy with `bundle` all directories with `.resources` suffixes in the build directory. I think it's quite impossible to stumble upon unrelated directories with this approach, while it still resolves the issue as intended, in my opinion.
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.
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.
Also creating a variable for making upgrades easily in the future.
* Upgrade binaryen binary version
* Add trailing newline to `install_ubuntu_deps.sh`
Co-authored-by: Max Desiatov <max@desiatov.com>
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
Resolves#274.
* Statically link with `SwiftPMDataModel`
* Use 5.6 upstream branches in `Package.swift`
* Update Swift Argument Parser to 1.0.2
* Use latest SwiftPM 5.5
* Avoid copying non-existent `.so` in `Dockerfile`
Co-authored-by: Max Desiatov <max@desiatov.com>
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`