Git Product home page Git Product logo

Comments (5)

phimage avatar phimage commented on May 31, 2024 1

I have same issues with accio on accio, or on https://github.com/IBDecodable/IBGraph/blob/master/Package.swift
(xcode 10.3, carthage 0.33.0)

I do not know how normally this could work but I try to make something
by excluding local package dependencies
But I do not thinks it is the solution, because target name could be different from product name

https://github.com/JamitLabs/Accio/compare/stable...phimage:fix/could_not_find_library?expand=1

ps: I make also comparing product name with ignore case, because I have an executable different case from target

from accio.

Jeehut avatar Jeehut commented on May 31, 2024

Could you please provide a complete Pakcage.swift contents so we can better understand the issue?

from accio.

SentulAsia avatar SentulAsia commented on May 31, 2024

I have similar problem @Dschee:

import PackageDescription

let package = Package(
    name: "DataStoreManager",
    platforms: [
        .iOS(.v8),
        .macOS(.v10_10),
        .watchOS(.v2),
        .tvOS(.v9)
    ],
    products: {
        var products: [Product] = []
        // Products define the executables and libraries produced by a package, and make them visible to other packages.
#if os(iOS)
        products.append(contentsOf: [
            .library(
                name: "DataStoreManager",
                targets: [
                    "DataStoreManager-iOS"
                ]
            ),
        ])
#elseif os(macOS)
        products.append(contentsOf: [
            .library(
                name: "DataStoreManager",
                targets: [
                    "DataStoreManager-macOS"
                ]
            ),
        ])
#elseif os(watchOS)
        products.append(contentsOf: [
            .library(
                name: "DataStoreManager",
                targets: [
                    "DataStoreManager-watchOS"
                ]
            ),
        ])
#elseif os(tvOS)
        products.append(contentsOf: [
            .library(
                name: "DataStoreManager",
                targets: [
                    "DataStoreManager-tvOS"
                ]
            ),
        ])
#endif
        return products
    }(),
    dependencies: [
        // add your dependencies here, for example:
        // .package(url: "https://github.com/User/Project.git", .upToNextMajor(from: "1.0.0")),
    ],
    targets: {
        var targets: [Target] = []
#if os(iOS)
        targets.append(contentsOf: [
            .target(
                name: "DataStoreManager-iOS",
                dependencies: [
                    // add your dependencies scheme names here, for example:
                    // "Project",
                ],
                path: "Sources/DataStoreManager"
            ),
            .testTarget(
                name: "DataStoreManagerTests-iOS",
                dependencies: [
                    "DataStoreManager-iOS"
                ],
                path: "Tests/DataStoreManagerTests"
            ),
        ])
#elseif os(macOS)
        targets.append(contentsOf: [
            .target(
                name: "DataStoreManager-macOS",
                dependencies: [
                    // add your dependencies scheme names here, for example:
                    // "Project",
                ],
                path: "Sources/DataStoreManager"
            ),
            .testTarget(
                name: "DataStoreManagerTests-macOS",
                dependencies: [
                    "DataStoreManager-macOS"
                ],
                path: "Tests/DataStoreManagerTests"
            ),
        ])
#elseif os(watchOS)
        targets.append(contentsOf: [
            .target(
                name: "DataStoreManager-watchOS",
                dependencies: [
                    // add your dependencies scheme names here, for example:
                    // "Project",
                ],
                path: "Sources/DataStoreManager"
            ),
        ])
#elseif os(tvOS)
        targets.append(contentsOf: [
            .target(
                name: "DataStoreManager-tvOS",
                dependencies: [
                    // add your dependencies scheme names here, for example:
                    // "Project",
                ],
                path: "Sources/DataStoreManager"
            ),
            .testTarget(
                name: "DataStoreManagerTests-tvOS",
                dependencies: [
                    "DataStoreManager-tvOS"
                ],
                path: "Tests/DataStoreManagerTests"
            ),
        ])
#endif
        return targets
    }(),
    swiftLanguageVersions: [.v5]
)

from accio.

yoiang avatar yoiang commented on May 31, 2024

@SentulAsia can you clarify where the problem is occurring for you, or what the error output looks like?

For me the Package.swift looks like:

// swift-tools-version:5.0
import PackageDescription

let package = Package(
    name: "MyProjectFramework",
    products: [
        .library(name: "MyProjectFramework", targets: ["MyProjectFramework"]),
    ],
    dependencies: [
        ...
    ],
    targets: [
        .target(
            name: "MyProjectFramework",
            dependencies: [
                ...
            ],
            path: "MyProjectFramework"
        ),
        .testTarget(
            name: "MyProjectFrameworkTests",
            dependencies: [
                "MyProjectFramework",
                ...
            ],
            path: "MyProjectFrameworkTests"
        ),
    ]
)

The resulting error I get is:

❌  DependencyGraph: Could not find library product with name 'MyProjectFramework' in package manifest for project 'MyProjectFramework'.

from accio.

fredpi avatar fredpi commented on May 31, 2024

Closing this, as Accio is now deprecated.

from accio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.