Commit Graph

243 Commits

Author SHA1 Message Date
Max Desiatov 1c946ea2aa
Bump version to 0.7.1, update `CHANGELOG.md` 2020-10-22 17:59:04 +01:00
Max Desiatov ea810786d4
Make `checkAndLog` look in Xcode toolchains path 2020-10-22 17:58:38 +01:00
Max Desiatov 9d8a8a5a43
Add `release.yml` workflow with `brew bottle` 2020-10-22 17:05:28 +01:00
Max Desiatov 2f2b13ec6e
Bump version to 0.7.0, update `CHANGELOG.md` 2020-10-22 16:38:51 +01:00
Max Desiatov 566e3419e2
Bump JavaScriptKit to 0.8, stop checking revision (#139)
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.
2020-10-22 15:49:45 +01:00
Max Desiatov c3d108db10
Avoid repeated `loadingMessage` in `ProcessRunner` (#138)
Without this patch `ProcessRunner` output pollutes non-interactive terminals such as GitHub Actions logs, where `loadingMessage` value is printed multiple times in a row for every compiled file.
2020-10-22 15:49:20 +01:00
Max Desiatov 55013181aa
Add support for signed `.pkg` archives on macOS (#137)
`carton` can't install toolchains from `.pkg` archives at the moment, and the latest toolchain snapshots are distributed exclusively as signed `.pkg` for macOS.

Parts of `ToolchainManagement.swift` related to toolchain installation were moved to `ToolchainInstallation.swift`.

* Add support for signed `.pkg` archives on macOS

* Bump toolchain version to `2020-10-21`
2020-10-22 15:48:56 +01:00
Max Desiatov a889569373
Add Dockerfile, mention the Docker image in `README.md` (#136)
Resolves #119.

* Mention the Docker image in `README.md`

* Update .dockerignore

* Test Docker image building on CI

* Bring back the GitHub token to `swift.yml`
2020-10-22 10:58:16 +01:00
Max Desiatov 017a6323a9
Use sudo for deps script to fix Ubuntu 20.04 build 2020-10-21 14:39:45 +01:00
Max Desiatov 753f06ace8
Use Xcode 12.1 to fix Big Sur builds 2020-10-21 14:30:45 +01:00
Max Desiatov 4635766c61
Fix support for Ubuntu 20.04, use GHA for SwiftLint (#134)
Resolves #114.

As support for SwiftLint in Danger seems a bit buggy (causing duplicate warning comments sometimes), this PR calls SwiftLint through a separate action that displays warnings only in the PR diff and hopefully in better way.

* Add support for Ubuntu 20.04

* Refine formatting

* Move SwiftLint to a separate GitHub Action

* Fix linker warnings

* Remove `danger.yml` and `Dangerfile.swift`

* Remove `--strict` argument from `swiftlint.yml`

* Update README.md
2020-10-21 14:27:50 +01:00
Max Desiatov d4c92c5e0e
Build on macOS Big Sur with GitHub Actions (#132)
Now that Big Sur is available on GitHub Actions, we can get more certainty that everything works with the new OS (on Intel hardware for now).

* Build on macOS Big Sur with GitHub Actions
* Clarify Ubuntu 18.04 job name
2020-10-21 14:25:07 +01:00
Max Desiatov 19883a503c
Remove sudo usage from `install_ubuntu_deps.sh` (#135)
* Remove sudo usage from `install_ubuntu_deps.sh`

`sudo` is not always available in Docker containers, so we should assume users will run the script itself with `sudo` when needed.

* Update swift.yml
2020-10-21 08:49:16 +01:00
Max Desiatov 08956baf1d
Add separate Builder class, use WasmTransformer (#131)
Resolves #127.

* Add separate Builder class, use WasmTransformer

* Don't apply the transformer in non-browser environments

* Fix macOS Swift 5.2 build failure

* Fix Package.swift errors

* Fix cyclic dependency in `Package.swift`

* Bump WasmTransformer requirement to 0.0.1

* Rename `case wasmer` to `case other`
2020-10-21 08:48:03 +01:00
Max Desiatov 703078dd83
Bump toolchain, use `--enable-test-discovery` (#130)
In the latest 5.3 toolchain all known issues with IndexStoreDB and SwiftPM support were resolved.

Resolves the second point of #42.

Thanks to this you no longer need to maintain `LinuxMain.swift` and `XCTestManifests.swift` files in your test suites, so these are deleted from the test app `Tests` directory.
2020-10-20 09:29:25 +01:00
Max Desiatov fc14c28f0c
Fix sysroot typo in `ToolchainManagement.swift` 2020-10-19 09:56:07 +01:00
Friendly Helper Robot 0aca3c99b7
Update dependencies (#133)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-10-18 09:32:35 +01:00
Max Desiatov 567baac2d5
Bump default toolchain, make i64 bug reproducible (#128)
`TestApp/.swift-version` is removed as it was mostly duplicating the default toolchain version. Downloads of recent toolchains is fixed now with the new `macos` tarball suffix that replaces `osx`. `TestApp/main.swift` is updated to make #127 easily reproducible.
2020-10-14 22:00:42 +01:00
Carson Katri 97a7e4fbac
Pretty print diagnostics (#122) 2020-10-14 07:26:31 -04:00
Friendly Helper Robot 95cb7d5086
Update dependencies (#125)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-10-11 09:33:48 +01:00
Max Desiatov 6c46eb02bd
Add @carson-katri and @kateinoigakukun to `FUNDING.yml` (#124)
* Add @carson-katri and @kateinoigakukun to `FUNDING.yml`

* Update README.md
2020-10-10 11:42:15 +01:00
Friendly Helper Robot 467187bc17
Update dependencies (#118)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-10-04 09:23:22 +01:00
yonihemi 0731ccb36f
Automatically open a browser window when Dev Server starts (#117)
* Automatically open dev server in system browser

* Allow opting out of automatically opening in browser

* Update readme with new behavior
2020-10-03 00:13:54 +08:00
Max Desiatov a34ffd4249
Update `static.zip` URL and its hashes 2020-10-01 20:43:14 +01:00
yonihemi 447ef7de2f
Allow changing dev server's port (#116)
* Allow changing dev server's port

* Update entrypoint/dev.js

Co-authored-by: Jed Fox <git@jedfox.com>

* Revert unnecessary port injection to HTML

Co-authored-by: Jed Fox <git@jedfox.com>
2020-10-01 17:13:14 +01:00
Max Desiatov 6c1a12df6c
Bump version to 0.6.1, update `CHANGELOG.md` 2020-09-29 11:41:50 +01:00
Max Desiatov 511ed784ed
Update Toolchain.swift 2020-09-29 11:31:12 +01:00
Max Desiatov e76a97ece5
Mention `carton package` in README.md 2020-09-28 21:37:34 +01:00
Max Desiatov d11aca1989
Bump version to 0.6.0, update `CHANGELOG.md` 2020-09-28 21:30:26 +01:00
Max Desiatov ec698a677e
Specify Ubuntu 18.04 requirement in `README.md` 2020-09-28 20:17:35 +01:00
Max Desiatov cd660a8d86
Use raw stdout if TerminalController is unavailable (#113)
TTY terminal output is unavailable on CI, or when users redirect output to a file or a pipe. In those cases `TerminalController` initializer returns `nil`. SwiftPM has a wrapper `InteractiveWriter` class for it, which writes output to stdout directly in that case. I've copied that, and replaced all uses of `TerminalController` with it. A VSCode task is added to test that.

In my testing it looks like download progress reporting is quite spammy, so it now has `removeDuplicates` Combine operator added to make it output only when values differ significantly from each other.

Additionally, SDK installs can hit GitHub API rate limit on CI nodes, so `carton` now reads `GITHUB_TOKEN` environment variable, which gives much higher limits to authenticated API users.

We can now also run various `carton` commands on CI for basic end-to-end testing.

Resolves #112.
2020-09-28 20:14:18 +01:00
Max Desiatov c75f6c98d7
Bump JavaScriptKit to 0.7.2 (#115) 2020-09-28 16:47:59 +01:00
Max Desiatov 4eb18d2f04
Bump dependencies and default toolchain snapshot (#111)
The latest SwiftWasm 5.3 snapshot requires users to use `import WASILibc` instead of `import Glibc`. This makes differences between platforms more explicit.
2020-09-26 19:53:39 +01:00
Friendly Helper Robot c588d55cf7
Update dependencies (#105)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-09-24 11:25:29 +01:00
Max Desiatov 1e49463d64
Implement resources copying in `carton bundle` (#109)
* Define `resourcesPath` on `SwiftToolchain.Package`

* Implement resources copying in `carton bundle`

* Remove redundant newline in log output
2020-09-20 09:46:49 +01:00
Max Desiatov b2aa6fd62c
Update node.js dependencies, including wasmer.js (#108)
Resolves #25
2020-09-16 21:07:05 +01:00
Max Desiatov 3478fb082e
Bump JavaScriptKit dependency to 0.6.0 (#107)
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.
2020-09-14 12:36:06 +01:00
Max Desiatov 9c94fd02b1
Implement support for static resources in `carton dev` (#104)
This change requires `wasm-5.3-SNAPSHOT-2020-09-08-a` or later, therefore the default toolchain version has been bumped.

Implements the `carton dev` part of #38, `carton bundle` support will be implemented in a future PR.
2020-09-14 10:36:09 +01:00
Max Desiatov c051ab77b5
Bump default toolchain version, fix release builds (#106)
The latest 5.3 toolchain snapshot fixes release builds of Tokamak. 

We no longer need `carton bundle` to produce debug builds by default, so it closes #103 as outdated.

Formatting of a `carton bundle` message is fixed as it didn't have a required trailing newline.
2020-09-10 10:42:23 +01:00
dependabot[bot] 62a81df21e
Bump bl from 4.0.2 to 4.0.3 (#102)
Bumps [bl](https://github.com/rvagg/bl) from 4.0.2 to 4.0.3.
- [Release notes](https://github.com/rvagg/bl/releases)
- [Commits](https://github.com/rvagg/bl/compare/v4.0.2...v4.0.3)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-02 21:35:54 +01:00
Max Desiatov 53a1d46813
Implement `--custom-index-page` option (#101)
Allows passing a path to your custom `index.html` as `--custom-index-page` to `carton dev` and `carton bundle`. The entrypoint script is then injected into this file with a simple text substitution looking for a closing `</head>` tag. The assumption is that your custom `<body>` is not supposed to contain an unescaped `<head></head>`, and adding a dependency on a proper HTML parser to implement this injection is too costly.

Depends on #97.

Resolves #100.
2020-08-31 18:37:43 +01:00
Max Desiatov 5a5e7397eb
Implement `carton bundle` command (#97)
New `bundle.js` entrypoint is added, which only differs from `dev.js` in the lack of the WebSocket hot reloading bit.

`wabt` and `binaryen` Homebrew dependencies are added as required for `wasm-strip` and `wasm-opt` respectively that reduce the resulting bundle binary size.

All resulting bundle files except `index.html` are named by their content hashes to enable [cache busting](https://www.keycdn.com/support/what-is-cache-busting).

Resolves #16.
2020-08-31 16:29:47 +01:00
Max Desiatov 4d437c6dd6
Reduce frequency to weekly in `update-deps.yml` 2020-08-30 16:49:17 +01:00
Max Desiatov 45fb3bb7f8
Update `tokamak` template for the new TokamakUI org (#98) 2020-08-30 08:59:58 +01:00
Yuta Saito 86c9998a32
Add carton package cmd (#96)
* Ignore generate-xcodeproj artifact

* Add carton package command which proxies to swift-package in the selected toolchain
2020-08-28 17:35:15 +09:00
Friendly Helper Robot 6d71bdfa0c
Update dependencies (#95)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-08-28 08:39:06 +01:00
Max Desiatov 751a638841
Update `carton` build path on Linux in README.md 2020-08-26 21:30:15 +01:00
Friendly Helper Robot 52ca099e02
Update dependencies (#94)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-08-25 08:52:09 +01:00
Friendly Helper Robot 8bedd9f81e
Update dependencies (#93)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-08-21 07:54:02 +01:00
Max Desiatov 7150f629ba
Bump version to 0.5.0 2020-08-20 12:09:10 +01:00