swiftwasm / swift

WebAssembly support for the Swift programming language
https://swiftwasm.org
1.32k stars 28 forks source link

SwiftWasm 5.3.0 release checklist #1759

Closed MaxDesiatov closed 3 years ago

MaxDesiatov commented 4 years ago

These are the things that would be great to see before SwiftWasm 5.3.0 is tagged:

As usual, feedback is welcome. Lmk if you see anything's missing, but also bear in mind that the upstream 5.3.0 is going to be released very soon, almost certainly with iOS 14, so this list can't grow much more.

kateinoigakukun commented 4 years ago

Re-enable stdlib test suite on CI for at least macOS in swiftwasm-release/5.3 branch, ideally on Linux too (it currently fails, but CI passes anyway)

I think the stdlib test suites are running on macOS CI now.

Rename Glibc module to WASI in SwiftWasm 5.3 snapshots (tracked in #196, WIP in #1685)

I'll do this for 5.3 branch

Ship working IndexStore in SwiftWasm 5.3 snapshots to allow swift test --enable-test-discovery (WIP in #1496)

I'll take a look again for the failure reason

Attempt integrating new LTO into swiftwasm-release/5.3 branch? I'm probably fine releasing 5.3.0 without it.

I think it's too hard to integrate it with 5.3 branch at this time. I need to resolve conflict between 5.3 and master

MaxDesiatov commented 4 years ago

I've checked the latest 5.3 run on macOS and there are no test results in the logs, even though it seems like it attempts to build the stdlib unittest target. 🤔

kateinoigakukun commented 4 years ago
2020-09-25T16:41:44.1534080Z 5 warning(s) in tests
2020-09-25T16:41:44.1690960Z 
2020-09-25T16:41:44.1691620Z Testing Time: 663.31s
2020-09-25T16:41:44.1691900Z   Expected Passes    : 111
2020-09-25T16:41:44.1692190Z   Expected Failures  : 2
2020-09-25T16:41:44.1693490Z   Unsupported Tests  : 108

stdlib tests were done on CI but swift-test-results.tar.gz doesn't contain any result.

MaxDesiatov commented 4 years ago

One more thing for the release I want to try tomorrow is to patch SourceKit-LSP so that it can take a --destination argument and pass it to swift build. This should make it possible to get autocomplete in VSCode with Tokamak and projects that depend on it.

kateinoigakukun commented 4 years ago

Before releasing 5.3, I'll add additional configuration to publish toolchain as signed and installable via pkg installer.

MaxDesiatov commented 4 years ago

Awesome, thank you for taking care of this!

MaxDesiatov commented 4 years ago

@swiftwasm/swiftwasm-team looks like swift-wasm-5.3-SNAPSHOT-2020-10-20-a is our 5.3.0 release candidate, WDYT? Have you seen any issues with this toolchain or any other recent snapshots?

kateinoigakukun commented 4 years ago

I want to include https://github.com/swiftwasm/swift/pull/2054 also.

MaxDesiatov commented 4 years ago

Right, it was supposed to be included in 2020-10-21, but the nightly distribution script failed with The job running on runner GitHub Actions 3 has exceeded the maximum execution time of 360 minutes. As you have the signing assets, could you tag that snapshot one last time? We could look at the distribution/signing script later after 5.3.0 is released.

kateinoigakukun commented 4 years ago

Yes, the distribution script failed and I'm debugging it. OK, I'll publish today's toolchain from my local machine.

MaxDesiatov commented 4 years ago

Thanks, I appreciate it! Now that wasm-5.3-SNAPSHOT-2020-10-21-a is tagged, let's use that for a week and tag it as 5.3.0 after that if there are no issues or objections by then.

MaxDesiatov commented 4 years ago

Discovered a new bug #2072. Would be great to fix, I've added it to the checklist.

kateinoigakukun commented 4 years ago

@swiftwasm/swiftwasm-team Some essential changes are now landed on swiftwasm-release/5.3 branch.

I think swift-wasm-5.3-SNAPSHOT-2020-10-26-a is a latest release candidate for 5.3. I'll test the toolchain in this week, and if there is no big issue, I want to tag it as 5.3-RELEASE.

MaxDesiatov commented 4 years ago

I've pushed a change to SwiftPM in the 5.3 branch to use .wasm as the default extension for produced Wasm binaries yesterday. I'm not seeing it in swift-wasm-5.3-SNAPSHOT-2020-10-27-a, which was tagged last night, investigating why. I hope we can squeeze that change in, as making it after the release would be far more disruptive I think.

kateinoigakukun commented 4 years ago

@MaxDesiatov Did you trigger swiftwasm/swift CI after merging SwiftPM change? I think we need to trigger again for 5.3 branch.

MaxDesiatov commented 4 years ago

Yes, I did trigger it in https://github.com/swiftwasm/swift/actions/runs/331791742

kateinoigakukun commented 4 years ago

@MaxDesiatov I tried using a toolchain produced by https://github.com/swiftwasm/swift/runs/1315973687?check_suite_focus=true, but it seems something wrong in SwiftPM change. It doesn't produce a binary with .wasm extension. I confirmed that SwiftPM is built from the latest revision https://github.com/swiftwasm/swift/runs/1315973687?check_suite_focus=true#step:5:731


$ $HOME/Downloads/swift-wasm-5.3-SNAPSHOT-2020-10-27-a/usr/bin/swift package init --name Example --type executable
$ $HOME/Downloads/swift-wasm-5.3-SNAPSHOT-2020-10-27-a/usr/bin/swift build --triple wasm32-unknown-wasi
$ ls .build/debug/
Example                         Example.product                 Example.swiftmodule             ExamplePackageTests.product     description.json
Example.build                   Example.swiftdoc                Example.swiftsourceinfo         ModuleCache                     index
MaxDesiatov commented 4 years ago

Thanks, I'm having a closer look at this now!

MaxDesiatov commented 4 years ago

The .wasm extension issue is fixed in #2125.

Another thing I noticed is that in latest snapshots Foundation can't be linked if you don't pass -Xswiftc -static-stdlib, which seems weird because I didn't expect these to be related:

$ ~/.carton/sdk/wasm-5.3-SNAPSHOT-2020-10-29-a/usr/bin/swift package init --name Example --type executable
$ echo 'import Foundation; print(Date())' > Sources/Example/main.swift
$ ~/.carton/sdk/wasm-5.3-SNAPSHOT-2020-10-29-a/usr/bin/swift build --triple wasm32-unknown-wasi
Sources/Example/main.swift:1:8: error: no such module 'Foundation'
$ ~/.carton/sdk/wasm-5.3-SNAPSHOT-2020-10-29-a/usr/bin/swift build --triple wasm32-unknown-wasi -Xswiftc -static-stdlib
[4/4] Linking Example
MaxDesiatov commented 4 years ago

I've cherry-picked https://github.com/apple/swift-package-manager/pull/3013 to the 5.3 branch and triggered a new build. After that completes, I think that's the best candidate so far 🙂

kateinoigakukun commented 4 years ago

What do you think about tagging swift-wasm-5.3-SNAPSHOT-2020-11-02-a as release-5.3 ? Did you find any serious problem?

MaxDesiatov commented 4 years ago

I didn't, looking good so far. 👍 The tag would be swift-wasm-5.3.0-RELEASE or swift-wasm-5.3-RELEASE, right? Upstream has swift-5.3-RELEASE, without the patch version, which strictly speaking is not compatible with semver that for example SwiftPM uses when resolving packages 🤔

Maybe we should tag both swift-wasm-5.3.0-RELEASE and swift-wasm-5.3-RELEASE to stay on the safe side?

kateinoigakukun commented 4 years ago

Maybe we should tag both swift-wasm-5.3.0-RELEASE and swift-wasm-5.3-RELEASE to stay on the safe side?

I agree with the safe side. 👍

kateinoigakukun commented 4 years ago

I'm going to distribute with the following parameters. If it's ok, please add 👍 reaction on this post

Screen Shot 2020-11-06 at 20 43 02
MaxDesiatov commented 4 years ago

Amazing, appreciate it! 👏

kateinoigakukun commented 4 years ago

Distribution started https://github.com/swiftwasm/swift/runs/1363433263?check_suite_focus=true

MaxDesiatov commented 4 years ago

When it finishes, let's use it over the weekend to make sure everything's tagged correctly and works well, last minute checks basically. Then we could announce it widely in the beginning of next week, WDYT? As in, I'm a bit hesitant to announce it widely on Friday 😄

MaxDesiatov commented 4 years ago

As in, we still tag it today, and people who watch the repo will notice it, so no need to hide it from them. If those few people use it today or during the weekend and report issues, that would be useful. But I'm inclined to share it on SwiftWasm Twitter on Monday, in the beginning of the work week. Kind of a slow catious launch 🙂

kateinoigakukun commented 4 years ago

That's a reasonable plan! I'll also spend some time verifying the toolchain this weekend.

SDGGiesbrecht commented 4 years ago

🎉 Working great so far.

The only minor surprise was this (using the Ubuntu 20 toolchain):

error: missing required module 'CFXMLInterface'
  import FoundationXML
         ^

That import is guarded by #if canImport(FoundationXML), and used to be skipped safely. So it seems FoundationXML is half there and half missing. (Adding && !os(WASI) worked just fine.)

MaxDesiatov commented 4 years ago

@SDGGiesbrecht This is very useful, thanks for reporting this!

kateinoigakukun commented 4 years ago

@MaxDesiatov Now the issue was fixed and CI passed. Should we increment patch version for 5.3 release or note it as known issue on release note?

MaxDesiatov commented 4 years ago

One option could be to retag 5.3.0, but I'm not sure if the issue is critical enough. I imagine people would prefer to use the JS API for XML parsing anyway, instead or bundling whole FoundationXML in their apps. We could wait for upstream 5.3.1 and release this FoundationXML removal as a part of SwiftWasm 5.3.1 after that. @SDGGiesbrecht WDYT?

SDGGiesbrecht commented 4 years ago

I don’t think it is worth trying to fix in this release. It is not like there was a preceding release where #if canImport(FoundationXML) worked. FoundationXML isn’t very popular anyway since it is only sort of cross‐platform (it will never be available on iOS).

MaxDesiatov commented 3 years ago

Now that 5.3.0 is released, I'm closing this as resolved.