Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swift 5.7 errors on build #51

Open
pnewell opened this issue Aug 9, 2023 · 4 comments
Open

Swift 5.7 errors on build #51

pnewell opened this issue Aug 9, 2023 · 4 comments

Comments

@pnewell
Copy link

pnewell commented Aug 9, 2023

I successfully built the 5.7 branch using Xcode 14.0.1 but am having trouble building the example weather app. I am getting the following errors:

> Task :app:swiftBuildX86_64Debug FAILED
Swift PM flags: --configuration debug -Xswiftc -DDEBUG
error: dataCorrupted(Swift.DecodingError.Context(codingPath: [], debugDescription: "The given data was not valid JSON.", underlyingError: Optional(Error Domain=NSCocoaErrorDomain Code=3840 "Unexpected end of file" UserInfo={NSDebugDescription=Unexpected end of file})))
SWIFTPM_PD_LIBS was deprecated in favor of SWIFTPM_CUSTOM_LIBS_DIR
dataCorrupted(Swift.DecodingError.Context(codingPath: [], debugDescription: "The given data was not valid JSON.", underlyingError: Optional(Error Domain=NSCocoaErrorDomain Code=3840 "Unexpected end of file" UserInfo={NSDebugDescription=Unexpected end of file})))
@pnewell
Copy link
Author

pnewell commented Aug 9, 2023

I also noticed if I try to build the "core" package directly with the toolchain it gives me this error:

error: ExitCode(rawValue: 1)
[0/1] Planning builderror: 'basic_package': Invalid manifest
/Users/paulnewell/Development/basic_package/Package.swift:4:8: error: no such module 'PackageDescription'
import PackageDescription

@pnewell
Copy link
Author

pnewell commented Aug 9, 2023

Also noticing that when I try to build in Android Studio, it is creating the following folder in "build-tools": "1.9.7-swift5.4"

I'd expect this to be something else given I am using the 5.7 branch, but not sure if that is expected or not

@pnewell
Copy link
Author

pnewell commented Oct 25, 2023

I am testing out the new prebuilt 5.7 release, thanks for your work on this! Unfortunately it looks like there isn't an Xcode version that used 5.7.3, which means on Mac we dont have an option we can use?

@andriydruk
Copy link
Member

Hi,

You can use XCode 14.2. Changes between 5.7.2..5.7.3 were so minor that Apple decided not to rebuild the new version swiftlang/swift@swift-5.7.2-RELEASE...swift-5.7.3-RELEASE
Also, you can install the toolchain from Swift.org and switch the toolchain to custom with `export TOOLCHAIN=swift'

Please check the updated guide in the Readme of this repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants