carton/CHANGELOG.md

205 lines
10 KiB
Markdown
Raw Normal View History

2020-07-22 05:09:47 +08:00
# 0.4.0 (21 July 2020)
This release adds a few major features, namely `carton init` and `carton test` commands, `carton sdk local` subcommand, and enables support for linking with Foundation automatically.
2020-07-22 05:11:23 +08:00
Thanks to [@carson-katri](https://github.com/carson-katri),
[@RayZhao1998](https://github.com/RayZhao1998), [@JaapWijnen](https://github.com/JaapWijnen) and
[@broadwaylamb](https://github.com/broadwaylamb) for their contributions to this release!
2020-07-22 05:09:47 +08:00
**New features:**
Firstly, `carton dev` no longer requires a `--destination` flag with a manually crafted
`destination.json` file to link with Foundation. If your project has `import Foundation` anywhere in
its source code, a subset of Foundation provided with SwiftWasm is automatically linked. Please
check [the list of Foundation types currently unavailable in
SwiftWasm](https://github.com/swiftwasm/swift-corelibs-foundation/blob/23ec1a2948b823e324d8e88e446c9a2db012acfd/Sources/Foundation/CMakeLists.txt#L3)
for more details on Foundation compatibility (mostly filesystem, socket, multi-threading, and APIs
depending on those are disabled).
The new `carton init` command initializes a new SwiftWasm project for you (similarly to `swift package init`) with multiple templates available at your choice. `carton init --template tokamak`
2020-07-22 05:12:36 +08:00
creates a new [Tokamak](https://tokamak.dev/) project, while `carton init --template basic` (equivalent to
2020-07-22 05:09:47 +08:00
`carton init`) creates an empty SwiftWasm project with no dependencies. Also, `carton init list-templates` provides a complete list of templates (with only `basic` and `tokamak` available
currently).
The new `carton test` command runs your test suite in the [`wasmer`](https://wasmer.io/)
environment. Unfortunately, this currently requires a presence of `LinuxMain.swift` file and
explicit test manifests, `--enable-test-discovery` flag is not supported yet. Projects that can
build their test suite on macOS can use `swift test --generate-linuxmain` command to generate this
file.
**Breaking changes:**
The bundled `carton dev` JavaScript entrypoint has been updated to fix runtime issues in the
Swift-to-JavaScript bridge API. Because of this, projects that depend on
[JavaScriptKit](https://github.com/swiftwasm/JavaScriptKit) should specify `c90e82f` revision as a
dependency:
```swift
dependencies: [
.package(url: "https://github.com/kateinoigakukun/JavaScriptKit", .revision("c90e82f")),
],
```
Unfortunately, specifying a JavaScriptKit version in `Package.swift` as a dependency is not
supported by SwiftPM due to the use of unsafe flags, see
[swiftwasm/JavaScriptKit#6](https://github.com/swiftwasm/JavaScriptKit/issues/6) for more details.
**Closed issues:**
- Avoid running the tests if can't build them ([#56](https://github.com/swiftwasm/carton/issues/56))
- Verify SDK is already installed before installing the same version
([#45](https://github.com/swiftwasm/carton/issues/45))
- Automatically create destination JSON to allow linking Foundation
([#4](https://github.com/swiftwasm/carton/issues/4))
- Watcher should detect custom paths in Package.swift
([#1](https://github.com/swiftwasm/carton/issues/1))
**Merged pull requests:**
- Propagate test build/run failures in the exit code
([#61](https://github.com/swiftwasm/carton/pull/61)) via
[@MaxDesiatov](https://github.com/MaxDesiatov)
- Update static.zip, automate its release process
([#60](https://github.com/swiftwasm/carton/pull/60)) via
[@MaxDesiatov](https://github.com/MaxDesiatov)
- Upgrade JavaScriptKit to 0.5.0 ([#59](https://github.com/swiftwasm/carton/pull/59)) via
[@carson-katri](https://github.com/carson-katri)
- Add `carton init` command ([#54](https://github.com/swiftwasm/carton/pull/54)) via
[@carson-katri](https://github.com/carson-katri)
- Fix `carton test` output skipping lines ([#53](https://github.com/swiftwasm/carton/pull/53)) via
[@MaxDesiatov](https://github.com/MaxDesiatov)
- Implement `carton sdk local` subcommand ([#40](https://github.com/swiftwasm/carton/pull/40)) via
[@RayZhao1998](https://github.com/RayZhao1998)
- Add `list` flag and `testCases` argument to `test`
([#52](https://github.com/swiftwasm/carton/pull/52)) via
[@MaxDesiatov](https://github.com/MaxDesiatov)
- Implement simple wasmer runner for `test` command
([#51](https://github.com/swiftwasm/carton/pull/51)) via
[@MaxDesiatov](https://github.com/MaxDesiatov)
- Always pass --enable-test-discovery to swift build
([#49](https://github.com/swiftwasm/carton/pull/49)) via
[@MaxDesiatov](https://github.com/MaxDesiatov)
- Fix watcher missing root directories ([#48](https://github.com/swiftwasm/carton/pull/48)) via
[@MaxDesiatov](https://github.com/MaxDesiatov)
- Update to Vapor 4.15.2, fix formatting ([#47](https://github.com/swiftwasm/carton/pull/47)) via
[@MaxDesiatov](https://github.com/MaxDesiatov)
- Add sources to watcher per target ([#46](https://github.com/swiftwasm/carton/pull/46)) via
[@JaapWijnen](https://github.com/JaapWijnen)
- Avoid displaying destination files as SDK versions
([#44](https://github.com/swiftwasm/carton/pull/44)) via
[@MaxDesiatov](https://github.com/MaxDesiatov)
- Automatically link Foundation w/ destination.json
([#41](https://github.com/swiftwasm/carton/pull/41)) via
[@MaxDesiatov](https://github.com/MaxDesiatov)
- Use Combine instead of OpenCombine where possible
([#39](https://github.com/swiftwasm/carton/pull/39)) via
[@MaxDesiatov](https://github.com/MaxDesiatov)
- Add separate CartonHelpers/SwiftToolchain modules
([#35](https://github.com/swiftwasm/carton/pull/35)) via
[@MaxDesiatov](https://github.com/MaxDesiatov)
- Use `from` instead of `upToNextMinor` for OpenCombine
([#34](https://github.com/swiftwasm/carton/pull/34)) via
[@MaxDesiatov](https://github.com/MaxDesiatov)
- Bump OpenCombine version to 0.10.0 ([#33](https://github.com/swiftwasm/carton/pull/33)) via
[@broadwaylamb](https://github.com/broadwaylamb)
2020-07-08 06:01:54 +08:00
# 0.3.1 (7 July 2020)
This is a bugfix release that fixes SwiftWasm backtrace reporting in certain cases and also enables
sorting for the output of the `carton sdk versions` subcommand.
**Merged pull requests:**
- Fix backtrace logging for async startWasiTask ([#30](https://github.com/swiftwasm/carton/pull/30)) via [@MaxDesiatov](https://github.com/MaxDesiatov)
- Sort the output of `carton sdk versions` ([#29](https://github.com/swiftwasm/carton/pull/29)) via [@MaxDesiatov](https://github.com/MaxDesiatov)
2020-07-07 23:02:04 +08:00
# 0.3.0 (7 July 2020)
2020-07-09 00:31:30 +08:00
This is a release that adds a new `carton sdk versions` subcommand, new `--release` flag and a new
2020-07-08 06:01:54 +08:00
`--destination` option to the `carton dev` command. Additionally, archive size is logged when a new
SDK is downloaded, and backtrace logging is improved in browser consoles for crashing SwiftWasm
apps. Many thanks to [@RayZhao1998](https://github.com/RayZhao1998) and
[@ratranqu](https://github.com/ratranqu) for their contributions! 👏
2020-07-07 23:02:04 +08:00
**Closed issues:**
- Support linking with Foundation/CoreFoundation ([#11](https://github.com/swiftwasm/carton/issues/11))
**Merged pull requests:**
- Log archive size when downloading new SDK ([#28](https://github.com/swiftwasm/carton/pull/28)) via [@MaxDesiatov](https://github.com/MaxDesiatov)
- Update WASI polyfill, print a backtrace on crash ([#27](https://github.com/swiftwasm/carton/pull/27)) via [@MaxDesiatov](https://github.com/MaxDesiatov)
- Support `carton sdk versions` ([#21](https://github.com/swiftwasm/carton/pull/21)) via [@RayZhao1998](https://github.com/RayZhao1998)
- Add a --release flag to the carton dev command ([#19](https://github.com/swiftwasm/carton/pull/19)) via [@ratranqu](https://github.com/ratranqu)
- Add --destination option to the `carton dev` command ([#18](https://github.com/swiftwasm/carton/pull/18)) via [@ratranqu](https://github.com/ratranqu)
# 0.2.0 (26 June 2020)
This release introduces a new `carton sdk install` command that allows
you to quickly install the [SwftWasm](https://swiftwasm.org/) toolchain and SDK
without requiring any additional dependencies such as `swiftenv`. Also,
`carton dev` now automatically installs SwiftWasm through the same code paths
as `carton sdk install`, when no suitable SDK is detected.
2020-06-22 20:33:13 +08:00
# 0.1.5 (22 June 2020)
This is a refinement release that adds a `--version` flag. Additionally, the
2020-06-22 20:38:32 +08:00
`dev` command is no longer the default, now a simple `carton` invocation without
any arguments prints a help message describing available commands.
2020-06-22 20:33:13 +08:00
2020-06-22 05:18:32 +08:00
# 0.1.4 (21 June 2020)
This is a bugfix release that fixes the `dev.js` bundle broken in 0.1.3.
2020-06-22 04:28:06 +08:00
# 0.1.3 (21 June 2020)
This is a bugfix release that includes the latest version of
[JavaScriptKit](https://github.com/kateinoigakukun/JavaScriptKit/) runtime
in the `dev.js` bundle. It fixes a bug with reference counting of `JSObjectRef`
instances, which could lead to crashes.
2020-06-19 23:20:02 +08:00
# 0.1.2 (19 June 2020)
This is a bugfix release that fixes stdout and stderr WASI output in async handlers.
Previously stdout output was redirected with `console.log` only on the first pass
of execution of top-level code, while none of the output from async handlers (such
as DOM listeners) was redirected. Now in this release, stdout and stderr output
is consistently redirected with `console.log` and `console.error` respectively,
in all cases.
2020-06-19 07:29:42 +08:00
# 0.1.1 (19 June 2020)
This is a bugfix release that fixes dependency downloads on Linux. The issue was
caused by [Foundation not supporting HTTP
2020-06-19 23:20:02 +08:00
redirects](https://github.com/apple/swift-corelibs-foundation/pull/2744) in Swift 5.2 on Linux,
and is now resolved by using [AsyncHTTPClient](https://github.com/swift-server/async-http-client)
2020-06-19 07:29:42 +08:00
instead of Foundation's `URLSession` for dependency downloads.
2020-06-17 03:56:22 +08:00
# 0.1.0 (16 June 2020)
Since SwiftPM doesn't always build an executable target even if one is present without
an explicit `--product` option, the `dev` command now requires the presence of an executable
target in your `Package.swift`. Use the new `--product` option instead of `--target` to
2020-06-17 03:56:22 +08:00
disambiguate between multiple executable targets.
2020-06-17 02:16:42 +08:00
# 0.0.5 (16 June 2020)
Pass `--target` option to `swift build` when running the `dev` command.
2020-06-17 02:16:42 +08:00
2020-06-17 00:26:11 +08:00
# 0.0.4 (16 June 2020)
Fix index page body served by HTTP when running the `dev` command.
2020-06-09 18:05:17 +08:00
# 0.0.3 (9 June 2020)
Fix expected polyfill hashes and a fatal error triggered when hashes didn't match.
# 0.0.2 (9 June 2020)
Fix watching and reloading, allow multiple WebSocket connections in the watcher code. The
latter allows multiple browser windows to stay open and get reloaded simultaneously.
2020-06-09 16:41:38 +08:00
# 0.0.1 (6 June 2020)
First preview release, only a basic `dev` command is implemented.