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

No such module PackageDescription error #53

Open
pedrovgs opened this issue Oct 18, 2023 · 0 comments
Open

No such module PackageDescription error #53

pedrovgs opened this issue Oct 18, 2023 · 0 comments

Comments

@pedrovgs
Copy link

First of all, thank you for all the open-source repositories in relation to Swift-on-Android. It's just awesome!!

I'm trying to use this toolchain for a prototype and unfortunately I can't get it working. I followed the instructions from the readme but creating an empty Swift Package and running swift-build from the root folder returns this error:

Package.swift:6:8: error: no such module 'PackageDescription'

I'm checking if there is a problem with the toolchain but I think is ok. This is the version I'm using:

swift-build --version
Swift Package Manager - Swift 5.4.0

The project is just a library created with XCode where I just changed the Package.swift to use swift 5.4 instead of 5.8.

This is the Package.swift content:

// swift-tools-version: 5.4
// The swift-tools-version declares the minimum version of Swift required to build this package.

import Foundation
import PackageDescription

let package = Package(
    name: "DemoLibrary",
    products: [
        // Products define the executables and libraries a package produces, and make them visible to other packages.
        .library(
            name: "DemoLibrary",
            targets: ["DemoLibrary"]),
    ],
    dependencies: [
        // Dependencies declare other packages that this package depends on.
        // .package(url: /* package url */, from: "1.0.0"),
    ],
    targets: [
        // Targets are the basic building blocks of a package. A target can define a module or a test suite.
        // Targets can depend on other targets in this package, and on products in packages this package depends on.
        .target(
            name: "DemoLibrary",
            dependencies: []),
        .testTarget(
            name: "DemoLibraryTests",
            dependencies: ["DemoLibrary"]),
    ]
)

Is maybe something I'm missing? Maybe I should use the release for Swift 5.7 instead? I've seen there is a release branch but I don't know if this is ready right now.

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

1 participant