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

0.5.0 regression build failure #189

Open
chenrui333 opened this issue Sep 11, 2024 · 1 comment · May be fixed by #190
Open

0.5.0 regression build failure #189

chenrui333 opened this issue Sep 11, 2024 · 1 comment · May be fixed by #190

Comments

@chenrui333
Copy link

chenrui333 commented Sep 11, 2024

👋 trying to build 0.5.0 release for macOS sequoia, but seeing some build failure as below:

  [24/31] Compiling SourceKittenFramework ByteCount.swift
  /private/tmp/iblinter-20240910-4584-eycidf/IBLinter-0.5.0/.build/checkouts/SourceKitten/Source/SourceKittenFramework/SwiftDocs.swift:35:13: error: cannot find 'fputs' in scope
  33 |             )
  34 |         } catch let error as Request.Error {
  35 |             fputs(error.description, stderr)
     |             `- error: cannot find 'fputs' in scope
  36 |             return nil
  37 |         } catch {
  
  /private/tmp/iblinter-20240910-4584-eycidf/IBLinter-0.5.0/.build/checkouts/SourceKitten/Source/SourceKittenFramework/SwiftDocs.swift:35:38: error: cannot find 'stderr' in scope
  33 |             )
  34 |         } catch let error as Request.Error {
  35 |             fputs(error.description, stderr)
     |                                      `- error: cannot find 'stderr' in scope
  36 |             return nil
  37 |         } catch {
  make: *** [build] Error 1
@phimage
Copy link
Member

phimage commented Sep 12, 2024

I change to macOS v12 (maybe just that is needed), and bump some third parties version and it seems to work now

So you could edit Package.swift like this to compile

// swift-tools-version:5.7

import PackageDescription

var package = Package(
    name: "IBLinter",
    platforms: [.macOS(.v12)],
    products: [
        .executable(
            name: "iblinter", targets: ["IBLinter"]
        ),
        .library(
            name: "IBLinterFrontend",
            type: .dynamic, targets: ["IBLinterFrontend"]
        ),
        .library(
            name: "IBLinterKit", targets: ["IBLinterKit"]
        ),
        .executable(
            name: "iblinter-tools", targets: ["IBLinterTools"]
        )
    ],
    dependencies: [
        .package(url: "https://github.com/IBDecodable/IBDecodable.git", from: "0.6.1"),
        .package(url: "https://github.com/jpsim/SourceKitten.git", from: "0.36.0"),
        .package(url: "https://github.com/phimage/XcodeProjKit.git", from: "2.2.0"),
        .package(url: "https://github.com/apple/swift-argument-parser", from: "1.0.0"),
    ],
    targets: [
        .target(
            name: "IBLinter",
            dependencies: ["IBLinterFrontend"]
        ),
        .target(
            name: "IBLinterFrontend",
            dependencies: ["IBLinterKit"]
        ),
        .target(
            name: "IBLinterKit",
            dependencies: [
                "IBDecodable",
                .product(name: "SourceKittenFramework", package: "SourceKitten"), "XcodeProjKit",
                .product(name: "ArgumentParser", package: "swift-argument-parser"),
            ]
        ),
        .target(
            name: "IBLinterTools",
            dependencies: ["IBLinterKit", .product(name: "ArgumentParser", package: "swift-argument-parser")]
        ),
        .testTarget(
            name: "IBLinterKitTest",
            dependencies: ["IBLinterKit"],
            exclude: [
                "Resources"
            ]
        ),
    ]
)

#if os(Linux)
package.dependencies.append(.package(url: "https://github.com/apple/swift-crypto.git", from: "1.0.0"))
package.targets[2].dependencies.append(.product(name: "Crypto", package: "swift-crypto"))
#endif

@phimage phimage linked a pull request Oct 17, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants