Comments (9)
Sorry for your inconvenience. I'd like to know more details about your situation because I can't reproduce your issue on my side.
- Which version of carton are you using?
- Which OS and OS version are you using?
- Please report the exact command output you got.
from carton.
Hey,
I'm using the version installed with brew, I'm on the latest dev beta, but a while ago I tried on Monterey too
The problem is, there is no output
from carton.
Could you try with --verbose
option and tell me the output?
from carton.
hm it looks like Foundation on 13 requires swift 5.7?
^\n/Users/david/Library/Developer/Toolchains/swift-wasm-5.6.0-RELEASE.xctoolchain/usr/lib/swift/pm/ManifestAPI/PackageDescription.swiftinterface:4:8: error: failed to build module \'Foundation\'; this SDK is not supported by the compiler (the SDK is built with \'Apple Swift version 5.7 (swiftlang-5.7.0.130.3 clang-1400.0.29.51)\', while this compiler is \'SwiftWasm Swift version 5.6 (swiftlang-5.6.0)\'). Please select a toolchain which matches the SDK.\nimport Foundation\n ^\n<module-includes>:1:9: note: in file included from <module-includes>:1:\n#import \"Headers/Foundation.h\"\n ^\n/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:9: note: in file included from /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:\n#import <Foundation/NSBundle.h>\n ^\n/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:6:9: note: in file included from /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:6:\n#import <Foundation/NSString.h>\n ^\n/Users/david/Documents/Files/Xcode/Packages/web-test/Package.swift:3:8: error: failed to build module \'PackageDescription\' for importation due to the errors above; the textual interface may be broken by project issues or a compiler bug\nimport PackageDescription\n ^", diagnosticFile: nil)Error: fatalError
I tried using the 5.7 toolchain but it also failed
from carton.
I think I'm facing the same issue, and a bit of digging gave me this; error
- checking Swift compiler path: /Users/silly/.carton/sdk/wasm-5.6.0-RELEASE/usr/bin/swift
- checking Swift compiler path: /Users/silly/.swiftenv/versions/wasm-5.6.0-RELEASE/usr/bin/swift
- checking Swift compiler path: /Users/silly/Library/Developer/Toolchains/swift-wasm-5.6.0-RELEASE.xctoolchain/usr/bin/swift
Inferring basic settings...
- swift executable: /Users/silly/Library/Developer/Toolchains/swift-wasm-5.6.0-RELEASE.xctoolchain/usr/bin/swift
SwiftWasm Swift version 5.6 (swiftlang-5.6.0)
Target: arm64-apple-darwin21.6.0
Xcode: 14.1 beta
OS: Monterey 12.6
Sorry for the huge text blob
Parsing package manifest: [debug]: evaluating manifest for 'website-2.0' v. unknown [error]: invalidManifestFormat("<module-includes>:1:9: note: in file included from <module-includes>:1:\n#import \"Headers/Foundation.h\"\n ^\n/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:9: note: in file included from /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:\n#import <Foundation/NSBundle.h>\n ^\n/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:6:9: note: in file included from /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:6:\n#import <Foundation/NSString.h>\n ^\n/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:371:81: error: function does not return string type\n- (nullable instancetype)initWithUTF8String:(const char *)nullTerminatedCString NS_FORMAT_ARGUMENT(1);\n ^\n/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48: note: expanded from macro \'NS_FORMAT_ARGUMENT\'\n #define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A)))\n ^\n<module-includes>:1:9: note: in file included from <module-includes>:1:\n#import \"Headers/Foundation.h\"\n ^\n/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:9: note: in file included from /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:\n#import <Foundation/NSBundle.h>\n ^\n/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:6:9: note: in file included from /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:6:\n#import <Foundation/NSString.h>\n ^\n/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:372:52: error: function does not return NSString\n- (instancetype)initWithString:(NSString *)aString NS_FORMAT_ARGUMENT(1);\n ^\n/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48: note: expanded from macro \'NS_FORMAT_ARGUMENT\'\n #define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A)))\n ^\n<module-includes>:1:9: note: in file included from <module-includes>:1:\n#import \"Headers/Foundation.h\"\n ^\n/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:9: note: in file included from /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:\n#import <Foundation/NSBundle.h>\n ^\n/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:6:9: note: in file included from /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:6:\n#import <Foundation/NSString.h>\n ^\n/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:387:53: error: function does not return NSString\n+ (instancetype)stringWithString:(NSString *)string NS_FORMAT_ARGUMENT(1);\n ^\n/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48: note: expanded from macro \'NS_FORMAT_ARGUMENT\'\n #define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A)))\n ^\n<module-includes>:1:9: note: in file included from <module-includes>:1:\n#import \"Headers/Foundation.h\"\n ^\n/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:9: note: in file included from /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:\n#import <Foundation/NSBundle.h>\n ^\n/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:6:9: note: in file included from /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:6:\n#import <Foundation/NSString.h>\n ^\n/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:389:83: error: function does not return string type\n+ (nullable instancetype)stringWithUTF8String:(const char *)nullTerminatedCString NS_FORMAT_ARGUMENT(1);\n ^\n/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48: note: expanded from macro \'NS_FORMAT_ARGUMENT\'\n #define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A)))\n ^\n<module-includes>:1:9: note: in file included from <module-includes>:1:\n#import \"Headers/Foundation.h\"\n ^\n/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:9: note: in file included from /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:\n#import <Foundation/NSBundle.h>\n ^\n/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:6:9: note: in file included from /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:6:\n#import <Foundation/NSString.h>\n ^\n/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:395:114: error: function does not return string type\n- (nullable instancetype)initWithCString:(const char *)nullTerminatedCString encoding:(NSStringEncoding)encoding NS_FORMAT_ARGUMENT(1);\n ^\n/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48: note: expanded from macro \'NS_FORMAT_ARGUMENT\'\n #define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A)))\n ^\n<module-includes>:1:9: note: in file included from <module-includes>:1:\n#import \"Headers/Foundation.h\"\n ^\n/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:9: note: in file included from /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:\n#import <Foundation/NSBundle.h>\n ^\n/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:6:9: note: in file included from /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:6:\n#import <Foundation/NSString.h>\n ^\n/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:396:97: error: function does not return string type\n+ (nullable instancetype)stringWithCString:(const char *)cString encoding:(NSStringEncoding)enc NS_FORMAT_ARGUMENT(1);\n ^\n/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48: note: expanded from macro \'NS_FORMAT_ARGUMENT\'\n #define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A)))\n ^\n/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Modules/Foundation.swiftmodule/arm64e-apple-macos.swiftinterface:9:19: error: could not build Objective-C module \'Foundation\'\n@_exported import Foundation\n ^\n/Users/silly/Library/Developer/Toolchains/swift-wasm-5.6.0-RELEASE.xctoolchain/usr/lib/swift/pm/ManifestAPI/PackageDescription.swiftinterface:4:8: error: failed to build module \'Foundation\'; this SDK is not supported by the compiler (the SDK is built with \'Apple Swift version 5.7 (swiftlang-5.7.0.130.3 clang-1400.0.29.51)\', while this compiler is \'SwiftWasm Swift version 5.6 (swiftlang-5.6.0)\'). Please select a toolchain which matches the SDK.\nimport Foundation\n ^\n<module-includes>:1:9: note: in file included from <module-includes>:1:\n#import \"Headers/Foundation.h\"\n ^\n/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:9: note: in file included from /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:\n#import <Foundation/NSBundle.h>\n ^\n/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:6:9: note: in file included from /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:6:\n#import <Foundation/NSString.h>\n ^\n/Users/silly/development/website-2.0/Package.swift:3:8: error: failed to build module \'PackageDescription\' for importation due to the errors above; the textual interface may be broken by project issues or a compiler bug\nimport PackageDescription\n ^", diagnosticFile: nil)Error: fatalError
from carton.
I think the issue comes from our use of libSwiftPM - on macOS it defaults to use the toolchain provided by xcrun vs our toolchain. We have an imminent fix for Xcode 14/Swift 5.7 but we should look into fixing it in a more resilient way.
from carton.
I've tried compiling the new solution from source, however it seems that the issue still persists. Not sure if I'm doing something wrong from my end though
Fixed, by re-downloading the 5.7 sdk.
from carton.
I downloaded the 5.7 with:
carton sdk install wasm-5.7-SNAPSHOT-2022-11-09-a
I created a .swift-version
file with wasm-5.7-SNAPSHOT-2022-11-09-a
inside.
Now carton dev
goes further but in Safari console I get:
Error: JavaScriptKit supports only WASI reactor ABI.
Please make sure you are building with:
-Xswiftc -Xclang-linker -Xswiftc -mexec-model=reactor
Tested with carton 0.17 built from source code and it works.
from carton.
Related Issues (20)
- Publish `carton` as npm package HOT 4
- `carton dev` stops rebuilding/reloading after error
- Pick up `index.html` from resources of the main target in `Package.swift`
- Re-read supplied `index.html` on updates
- Automatically generate Swift bindings for TypeScript declarations HOT 5
- Update `carton init` template to allow `carton test` without modification HOT 1
- Add `carton shell` command making SwiftWasm toolchain the default in forked shell
- `carton test` should fail if crashing during `_initialize`
- `brew install swiftwasm/tap/carton` installs old version HOT 4
- compiler error, [-Wimplicit-function-declaration] HOT 5
- Docker not working HOT 1
- Support Ubuntu 22.04 LTS for toolchain downloader
- Error: Invalid version on Ubuntu 22.04 HOT 4
- ProcessInfo is empty when invoking `carton test` HOT 4
- Mismatched Swift Versions HOT 2
- Customize watcher directory
- Xcode 15 breaks `carton` build process HOT 4
- Missing `swift`- prefix from SDKs HOT 1
- Facing swift compiler version issue on` /root/.carton/sdk/wasm-5.7.1-RELEASE/usr/bin/swift` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from carton.