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

Doesn't build ("Type 'Bundle' has no member 'module'") #26

Closed
mkll opened this issue Nov 21, 2020 · 9 comments
Closed

Doesn't build ("Type 'Bundle' has no member 'module'") #26

mkll opened this issue Nov 21, 2020 · 9 comments

Comments

@mkll
Copy link

mkll commented Nov 21, 2020

Xcode 12.2
Screenshot 2020-11-22 at 04 40 20

@mkll
Copy link
Author

mkll commented Nov 21, 2020

feather 1.0.0-beta.2

// swift-tools-version:5.3
import PackageDescription

let package = Package(
    name: "feather",
    platforms: [
       .macOS(.v10_15)
    ],
    products: [
        .executable(name: "Run", targets: ["Run"]),
        .library(name: "App", targets: ["App"]),
    ],
    dependencies: [
        .package(url: "https://github.com/vapor/vapor", from: "4.34.0"),
        .package(url: "https://github.com/binarybirds/feather-core", from: "1.0.0-beta"),
//        .package(url: "https://github.com/binarybirds/feather-core", .branch("main")),
        .package(url: "https://github.com/binarybirds/leaf-foundation", from: "1.0.0-beta"),
        /// drivers
        .package(url: "https://github.com/vapor/fluent-sqlite-driver", from: "4.0.0"),
        .package(url: "https://github.com/binarybirds/liquid-local-driver", from: "1.0.0"),

//        .package(name: "redirect-module", url: "https://github.com/feather-modules/redirect", .branch("main")),
//        .package(name: "sponsor-module", url: "https://github.com/feather-modules/sponsor", .branch("main")),
//        .package(name: "static-module", url: "https://github.com/feather-modules/static", .branch("main")),
//        .package(name: "blog-module", url: "https://github.com/feather-modules/blog", .branch("main")),
//        .package(name: "swifty-module", url: "https://github.com/feather-modules/swifty", .branch("main")),
//        .package(name: "markdown-module", url: "https://github.com/feather-modules/markdown", .branch("main")),

        .package(url: "https://github.com/malcommac/UAParserSwift", from: "1.2.0"),
        .package(name: "ALanguageParser", url: "https://github.com/matsoftware/accept-language-parser", from: "1.0.0"),
 
        .package(url: "https://github.com/JohnSundell/Splash", from: "0.15.0"),
        .package(url: "https://github.com/JohnSundell/Ink", from: "0.5.0"),
    ],
    targets: [
        .target(name: "App", dependencies: [
            .product(name: "FeatherCore", package: "feather-core"),
            .product(name: "LeafFoundation", package: "leaf-foundation"),
            
            /// drivers
            .product(name: "FluentSQLiteDriver", package: "fluent-sqlite-driver"),
            .product(name: "LiquidLocalDriver", package: "liquid-local-driver"),

            /// modules
//            .product(name: "RedirectModule", package: "redirect-module"),
//            .product(name: "SponsorModule", package: "sponsor-module"),
//            .product(name: "StaticModule", package: "static-module"),
//            .product(name: "BlogModule", package: "blog-module"),
//            .product(name: "SwiftyModule", package: "swifty-module"),
//            .product(name: "MarkdownModule", package: "markdown-module"),

            .product(name: "UAParserSwift", package: "UAParserSwift"),
            .product(name: "ALanguageParser", package: "ALanguageParser"),
            
            .product(name: "Splash", package: "Splash"),
            .product(name: "Ink", package: "Ink"),

            .product(name: "Vapor", package: "vapor"),
        ], exclude: [
            "Modules/Analytics/Bundle",
            "Modules/Blog/Bundle",
            "Modules/Menu/Bundle",
            "Modules/Redirect/Bundle",
            "Modules/Site/Bundle",
            "Modules/Sponsor/Bundle",
            "Modules/Static/Bundle",
        ], swiftSettings: [
            .unsafeFlags(["-cross-module-optimization"], .when(configuration: .release))
        ]),
        .target(name: "Run", dependencies: [
             .target(name: "App"),
        ]),
//        .testTarget(name: "AppTests", dependencies: [
//            .target(name: "App"),
//            .product(name: "XCTVapor", package: "vapor"),
//        ])
    ]
)

@mkll mkll changed the title Doesn't build with "Type 'Bundle' has no member 'module'" message Doesn't build ("Type 'Bundle' has no member 'module'") Nov 21, 2020
@mkll
Copy link
Author

mkll commented Nov 22, 2020

Looks like I was in a hurry. I cloned main and it was built fine.

@mkll mkll closed this as completed Nov 22, 2020
@mkll mkll reopened this Nov 22, 2020
@mkll
Copy link
Author

mkll commented Nov 22, 2020

Hmm, no, it still doesn't build.

@tib
Copy link
Member

tib commented Nov 22, 2020

As I can see you're trying to build the project through a generated Xcode project file, but that's not going to work at all.

You should open the project via the Package.swift file, please don't generate an xcodeproj file, that's a deprecated way.

Please, let me know if this was / fixes your issue. Thanks.

@mkll
Copy link
Author

mkll commented Nov 22, 2020

Oh, thanks, I'l try. I've been experimenting a lot over the past few days, both with and without a project file, so I may not have tried it.

@mkll
Copy link
Author

mkll commented Nov 22, 2020

Ah! UAParser requires Big Sur, that's why I generated the project file, so at least I can fix the requirements manually. And if I try to compile through Patskage.swift, it cannot be fixed due to lock.

@mkll
Copy link
Author

mkll commented Nov 22, 2020

Found the checkout directory for UAParser and fixed requirements manually. Trying to build.

@mkll
Copy link
Author

mkll commented Nov 22, 2020

Voila! Feather is up and running!
Thanks for advice. :)

@mkll mkll closed this as completed Nov 22, 2020
@tib
Copy link
Member

tib commented Nov 22, 2020

Please also update your Swift package dependencies, UAParser dep is lowered to v10_15. ;)

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