Closed svanimpe closed 3 weeks ago
I've also encountered this issue when using JSONEncoder
from Foundation, in a project that doesn't use JavaScriptKit.
https://github.com/kateinoigakukun/swiftwasm-issue-gh-5580
I finally could reproduce the issue and it's already incidentally fixed by --gc-sections
support in the main branch. So it's reproducible with 6.0 snapshot.
But the root cause is still unclear... There should be something wrong in incremental compilation of swift-driver, so it might happen again
Steps to reproduce:
swift package init --type executable
Add JavaScriptKit as a dependency. My Package.swift file is as follows:
This results in a long list of errors like:
Workaround:
Add
import _RegexParser
in a Swift file.Environment:
swift-wasm-6.0-SNAPSHOT-2024-04-16-a-macos_x86_64