Skip to content

Cannot import Foundation on DEVELOPMENT channel #5560

Closed
@kkebo

Description

@kkebo

Environments where I reproduced the issue

  • Arch Linux ARM (Asahi Linux)
  • Ubuntu 20.04 (aarch64)

Steps to reproduce

$ curl -LO https://github.com/swiftwasm/swift/releases/download/swift-wasm-DEVELOPMENT-SNAPSHOT-2023-11-21-a/swift-wasm-DEVELOPMENT-SNAPSHOT-2023-11-21-a-ubuntu20.04_aarch64.tar.gz
$ tar xvf wift-wasm-DEVELOPMENT-SNAPSHOT-2023-11-21-a-ubuntu20.04_aarch64.tar.gz
$ export PATH=$PWD/swift-wasm-DEVELOPMENT-SNAPSHOT-2023-11-21-a/usr/bin:$PATH
$ which swift
/path/to/swift-wasm-DEVELOPMENT-SNAPSHOT-2023-11-21-a/usr/bin/swift
$ mkdir wasi-demo
$ cd wasi-demo
$ swift package init --type executable
$ echo 'import Foundation' > Sources/main.swift
$ swift build
Building for debugging...
[7/7] Linking wasi-demo
Build complete! (2.73s)
$ swift build --triple wasm32-unknown-wasi
Building for debugging...
/path/to/wasi-demo/Sources/main.swift:1:8: error: no such module 'Foundation'
import Foundation
       ^

Only recently built toolchains seem to have this problem, as swift-wasm-5.9-SNAPSHOT-2023-08-06-a was fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions