Commit Graph

496 Commits

Author SHA1 Message Date
Max Desiatov 0ac284a2cf
Fix typo in `CHANGELOG.md` 2020-12-21 11:40:00 +00:00
thecb4 5fe8c8edac
Changes to project structure to allow for better testability (#191)
* Changed sources folder to separate the CLI from the 'Kit' to allow for testability of each command

* Fixed Swift 5.2 Support

* Removed Path.swift (for now)

* Fixed OpenCombine and other version issues for 5.2 support

* Removed Path.swift from test target dependency

Co-authored-by: thecb4 <cavelle@tehcb4.io>
2020-12-21 05:14:24 -05:00
Max Desiatov dd452fb6f1
Update dependencies (#190)
Co-authored-by: MaxDesiatov <MaxDesiatov@users.noreply.github.com>
2020-12-20 10:12:24 +00:00
Max Desiatov a88429084d
Update `CHANGELOG.md` for 0.9.1 2020-12-19 17:17:18 +00:00
Max Desiatov b47058f446
Bump version to 0.9.1, update `CHANGELOG.md` 2020-12-19 15:30:25 +00:00
Max Desiatov d42606d18f
Add more debug/release tasks to `tasks.json` 2020-12-19 15:19:12 +00:00
Max Desiatov 77451a94ad
Update dependencies (#188)
Co-authored-by: MaxDesiatov <MaxDesiatov@users.noreply.github.com>
2020-12-17 13:49:20 +00:00
Max Desiatov ac19a7e868
Fix parsing system targets in `Package.swift` (#189)
This will unblock making CI work in TokamakUI/Tokamak#333.
2020-12-17 13:09:10 +00:00
dependabot[bot] 3015e7e4dc
Bump ini from 1.3.5 to 1.3.8 (#187)
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-12 21:40:44 +00:00
Jed Fox 1af4f5a6d0
Add support for Chrome and Safari stack traces (#186) 2020-12-07 15:31:29 -05:00
Max Desiatov 6342320602
Bump Tokamak template to enable Xcode autcomplete 2020-12-06 14:44:58 +00:00
Max Desiatov d1cf3bfcc3
Update dependencies (#184)
Co-authored-by: MaxDesiatov <MaxDesiatov@users.noreply.github.com>
2020-12-06 10:38:04 +00:00
Max Desiatov c6c4a11ec5
Update release.yml 2020-12-04 13:25:05 +00:00
Max Desiatov a7314cbb2e
Bump version to 0.9.0, update `CHANGELOG.md` 2020-12-04 13:05:55 +00:00
Max Desiatov 64e9c97ddc
Mark all commands as implemented in `README.md` (#180)
Also update the `carton test` section.
2020-12-04 11:41:20 +00:00
Max Desiatov 646ce1c2e1
Bump versions of libraries in `Template.swift` (#182) 2020-12-04 11:41:01 +00:00
Max Desiatov 09a4e67e9e
Serve main bundle resources from root directory (#176)
This is required to make the `Image` view work as described in https://github.com/TokamakUI/Tokamak/pull/155#issuecomment-723677472.

* 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

* Serve main bundle resources from root directory

* Fix archive hashes, bump JSKit in TestApp to 0.9.0

* Add comments to clarify behavior

* Fix typo in doc comment in `Package.swift`
2020-12-01 16:20:46 +00:00
Max Desiatov ef402e71e8
Use FileDownloadDelegate from the AHC package (#171)
`FileDownloadDelegate` was introduced in https://github.com/swift-server/async-http-client/pull/275, which almost directly mirrors the implementation in `carton`. Now that it's available in a released version of AHC, let's delete some code here and replace it with the version from that package.
2020-12-01 11:05:15 +00:00
Max Desiatov 1c15282114
Bump JSKit, add support for testing in browsers (#173)
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
2020-12-01 11:04:37 +00:00
Max Desiatov 66770cc009
Update dependencies (#179)
Co-authored-by: MaxDesiatov <MaxDesiatov@users.noreply.github.com>
2020-11-29 00:53:29 +00:00
Max Desiatov 64da926cea
Bump `defaultToolchainVersion` to 5.3.1 (#178)
* Bump defaultToolchainVersion to 5.3.1

* Bump version in Dockerfile
2020-11-28 11:25:17 +00:00
Max Desiatov 377aa7617a
Demangle and print Firefox stack traces in terminal (#162)
This currently supports only Firefox, parsing of stack traces for other browsers will be added in separate PRs.

Resolves a part of #26.

* 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

* Remove use of grey color in stacktrace output
2020-11-27 11:49:39 +00:00
Max Desiatov e6ec931070
Update dependencies (#172)
Co-authored-by: MaxDesiatov <MaxDesiatov@users.noreply.github.com>
2020-11-22 09:12:45 +00:00
Max Desiatov b56e3058c5
Reduce job frequency in `update-deps.yml` 2020-11-19 15:20:01 +00:00
Max Desiatov fd35bfd5df
Use peter-evans/create-pull-request@v3 in `update-deps.yml` 2020-11-18 13:25:18 +00:00
Max Desiatov bcf30a0a11
Update dependencies (#170)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-11-15 14:10:22 +00:00
Max Desiatov 90d072a889
Update release.yml 2020-11-09 14:36:15 +00:00
Max Desiatov abfaeb9a25
Bump version to 0.8.1, update `CHANGELOG.md` 2020-11-09 13:52:11 +00:00
Yuta Saito c9777ddf66
Add minimum deployment target in template (#165)
* Add minimum deployment target in template

* import TokamakDOM instead of Shim to avoid minimum deployment issue

* Bump initial Tokamak version 0.5.1
2020-11-09 22:36:17 +09:00
Yuta Saito c3bbfb38f3
Remove wabt-strip from log comment (#164) 2020-11-09 22:03:17 +09:00
Max Desiatov 5c6a3d0897
Update `release.yml` to use PAT 2020-11-09 11:24:35 +00:00
Max Desiatov e62b6adcf7
Bump version to 0.8.1, update `CHANGELOG.md` (#163) 2020-11-09 11:01:52 +00:00
Yuta Saito cc398196ff
Update Tokamak version used in init template (#160) 2020-11-09 18:48:21 +09:00
Friendly Helper Robot ff169be4aa
Update dependencies (#159)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-11-08 09:08:08 +00:00
Yuta Saito 8fdad38376
Add image source label (#161) 2020-11-08 18:07:30 +09:00
Max Desiatov 59bc8271d4
Bump version to 0.8.0, update `CHANGELOG.md` (#158)
* Bump version to 0.8.0, update `CHANGELOG.md`

* Fix subsection title formatting in CHANGELOG.md
2020-11-08 09:29:24 +09:00
Yuta Saito d13e7bad2e
Support system installed toolchain (#157)
* Support system installed toolchain

* Fix linux build

* Apply latest swiftformat

* Apply suggestions from code review

Co-authored-by: Max Desiatov <max@desiatov.com>

* Update Sources/SwiftToolchain/ToolchainResolver.swift

Co-authored-by: Max Desiatov <max@desiatov.com>

Co-authored-by: Max Desiatov <max@desiatov.com>
2020-11-07 21:29:00 +09:00
Yuta Saito b9702ea285
Remove wabt dependency (#156)
* Use WasmTransformer.stripCustomSections

* Remove wabt dependency
2020-11-06 23:51:10 +09:00
Yuta Saito 501274a72d
Use ghcr.io/swiftwasm/swift as base image (#154)
* Use ghcr.io/swiftwasm/swift as base image

* Drop swift- prefix for toolchain name

* Update default toolchain version
2020-11-06 22:14:10 +09:00
Max Desiatov ac97210433
Fix handling of test bundles with .wasm extension (#153)
After https://github.com/apple/swift-package-manager/pull/3013 was merged and cherry-picked for our 5.3 snapshots (starting with `wasm-5.3-SNAPSHOT-2020-11-02-a`), `carton test` needs to handle the `.wasm` extension in test products.
2020-11-05 21:34:59 +00:00
Max Desiatov 92d49f92d0
Round testing time to two decimal places (#152)
Currently test report outputs time as something like `0.17200000000000013s, estimated 1s`. This is not very readable, so maybe something like `0.17s` would be better?
2020-11-05 21:34:43 +00:00
Max Desiatov cbc04fb4f0
Build only test product and its deps for testing (#150)
Every Swift package with test targets has an implicit test product with `"\(package.name)PackageTests"` name. `swift build --build-tests` builds all products in a given package including the implicit test product. This doesn't work in situations where some of the products can't be compiled for Wasm, even when they are excluded with `condition: .when(platforms: [.macOS, .linux])` from test dependencies. This prevents tests from being built at all in such packages. OpenCombine is the primary victim of this problem.

Fortunately, the implicit test product can be accessed through the `--product` option passed to `swift build`. When using that option, only the test product and its dependencies are built. Products (and therefore their underlying targets) that aren't needed for tests are excluded from such builds. We should explicitly pass `--product` option to `swift build` instead of `--build-tests` in the `carton test` implementation to resolve the issue.

I've also added a new task to `tasks.json` that I previously used for testing `carton dev -v`.

`Dockerfile` has been updated to use the same toolchain as it does in `DefaultToolchain.swift`.

* Build only test product and its deps for testing

* Reuse product name interpolation

* Update `Dockerfile`
2020-11-02 13:52:33 +00:00
Max Desiatov 8f140d05f3
Apply formatting w/ latest version of SwiftFormat 2020-11-01 17:13:28 +00:00
Friendly Helper Robot a4b7f9f095
Update dependencies (#149)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-11-01 09:03:19 +00:00
Yuta Saito 0ee05ba7a9
Update toolchain and remove extra compiler flags (#147)
* Update toolchain version and remove extra compiler flags

* Ignore .swiftpm
2020-10-31 16:57:52 +09:00
Max Desiatov b1f01a437b
Fix handling of binaries with `.wasm` extension (#148)
Latest toolchains produce binaries with the `.wasm` extension which `carton` can't handle yet.
2020-10-30 16:50:59 +00:00
Carson Katri 1e286b4828
Pretty print `carton test` output (#144) 2020-10-28 11:06:55 -04:00
Yuta Saito 88a8e956f4
Stop using destination.json (#141)
* Remove unnecessary linker flags

* Remove destination json

* Import CoreFoundation explicitly to link it

* Remove Destination.swift model file

* Restore triple option

* Update default toolchain

* Workaround until https://github.com/swiftwasm/swift/pull/2097

* Revert "Workaround until https://github.com/swiftwasm/swift/pull/2097"

This reverts commit 285d2ae7aa.

* Update toolchain version

* Warn use of --destination

* Apply suggestions from code review

Co-authored-by: Max Desiatov <max@desiatov.com>

Co-authored-by: Max Desiatov <max@desiatov.com>
2020-10-28 19:57:28 +09:00
Max Desiatov 2e244f7999
Use Xcode 12.2 on macOS Big Sur (#145)
For some reason GHA Big Sur hosts no longer have Xcode 12.1 installed as evidenced by CI failures in #141 and #144. We can use Xcode 12.2 instead.
2020-10-27 10:36:45 +00:00
Carson Katri 91ea98fa5b
Fix error message output (#142) 2020-10-26 10:52:05 -04:00