Make ParserObjC a separate package and fix some linking issues.

This commit is contained in:
Brent Simmons 2024-05-21 21:34:08 -07:00
parent 1fee1f53ad
commit 926b8f494e
91 changed files with 61 additions and 22 deletions

View File

@ -12,6 +12,7 @@ let package = Package(
], ],
dependencies: [ dependencies: [
.package(path: "../Parser"), .package(path: "../Parser"),
.package(path: "../ParserObjC"),
.package(path: "../Articles"), .package(path: "../Articles"),
.package(path: "../ArticlesDatabase"), .package(path: "../ArticlesDatabase"),
.package(path: "../Web"), .package(path: "../Web"),
@ -33,6 +34,7 @@ let package = Package(
name: "Account", name: "Account",
dependencies: [ dependencies: [
"Parser", "Parser",
"ParserObjC",
"Web", "Web",
"Articles", "Articles",
"ArticlesDatabase", "ArticlesDatabase",

View File

@ -13,6 +13,7 @@ import UIKit
import Foundation import Foundation
import Articles import Articles
import Parser import Parser
import ParserObjC
import Database import Database
import ArticlesDatabase import ArticlesDatabase
import Web import Web

View File

@ -12,6 +12,7 @@ import SystemConfiguration
import os.log import os.log
import SyncDatabase import SyncDatabase
import Parser import Parser
import ParserObjC
import Articles import Articles
import ArticlesDatabase import ArticlesDatabase
import Web import Web

View File

@ -6,6 +6,7 @@
// Copyright © 2019 Ranchero Software, LLC. All rights reserved. // Copyright © 2019 Ranchero Software, LLC. All rights reserved.
// //
import Foundation
import Articles import Articles
import Database import Database
import Parser import Parser

View File

@ -6,6 +6,7 @@
// Copyright © 2019 Ranchero Software, LLC. All rights reserved. // Copyright © 2019 Ranchero Software, LLC. All rights reserved.
// //
import Foundation
import Articles import Articles
import Parser import Parser
import Web import Web

View File

@ -9,6 +9,7 @@
import Foundation import Foundation
import os.log import os.log
import Parser import Parser
import ParserObjC
import Articles import Articles
import ArticlesDatabase import ArticlesDatabase
import Web import Web

View File

@ -8,6 +8,7 @@
import Foundation import Foundation
import Parser import Parser
import ParserObjC
import Web import Web
import Articles import Articles
import ArticlesDatabase import ArticlesDatabase

View File

@ -7,6 +7,7 @@
// Copyright (c) 2020 Ranchero Software, LLC. All rights reserved. // Copyright (c) 2020 Ranchero Software, LLC. All rights reserved.
// //
import Foundation
import Articles import Articles
import Database import Database
import Parser import Parser

View File

@ -6,6 +6,7 @@
// Copyright (c) 2020 Ranchero Software, LLC. All rights reserved. // Copyright (c) 2020 Ranchero Software, LLC. All rights reserved.
// //
import Foundation
import Articles import Articles
import Database import Database
import Parser import Parser

View File

@ -9,6 +9,7 @@
import Foundation import Foundation
import os.log import os.log
import Parser import Parser
import ParserObjC
import Core import Core
@MainActor final class OPMLFile { @MainActor final class OPMLFile {

View File

@ -8,6 +8,7 @@
import Foundation import Foundation
import Parser import Parser
import ParserObjC
final class OPMLNormalizer { final class OPMLNormalizer {

View File

@ -6,6 +6,7 @@
// Copyright © 2019 Ranchero Software, LLC. All rights reserved. // Copyright © 2019 Ranchero Software, LLC. All rights reserved.
// //
import Foundation
import Articles import Articles
import Parser import Parser
import Web import Web

View File

@ -8,6 +8,7 @@
import Foundation import Foundation
import Parser import Parser
import ParserObjC
import Web import Web
import CommonErrors import CommonErrors

View File

@ -9,6 +9,7 @@
import Foundation import Foundation
import FoundationExtras import FoundationExtras
import Parser import Parser
import ParserObjC
private let feedURLWordsToMatch = ["feed", "xml", "rss", "atom", "json"] private let feedURLWordsToMatch = ["feed", "xml", "rss", "atom", "json"]

View File

@ -8,6 +8,7 @@
import Foundation import Foundation
import Parser import Parser
import ParserObjC
public final class FeedbinEntry: Decodable, @unchecked Sendable { public final class FeedbinEntry: Decodable, @unchecked Sendable {

View File

@ -9,6 +9,7 @@
import Foundation import Foundation
import CoreServices import CoreServices
import Parser import Parser
import ParserObjC
import UniformTypeIdentifiers import UniformTypeIdentifiers
// The favicon URLs may be specified in the head section of the home page. // The favicon URLs may be specified in the head section of the home page.

View File

@ -11,6 +11,7 @@ import Articles
import Account import Account
import Web import Web
import Parser import Parser
import ParserObjC
import Core import Core
public extension Notification.Name { public extension Notification.Name {

View File

@ -8,6 +8,7 @@
import Foundation import Foundation
import Parser import Parser
import ParserObjC
extension RSHTMLMetadata { extension RSHTMLMetadata {

View File

@ -8,6 +8,7 @@
import Foundation import Foundation
import Parser import Parser
import ParserObjC
import Web import Web
public struct InitialFeedDownloader { public struct InitialFeedDownloader {

View File

@ -1023,6 +1023,7 @@
845EE7B01FC2366500854A1F /* StarredFeedDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StarredFeedDelegate.swift; sourceTree = "<group>"; }; 845EE7B01FC2366500854A1F /* StarredFeedDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StarredFeedDelegate.swift; sourceTree = "<group>"; };
845EE7C01FC2488C00854A1F /* SmartFeed.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SmartFeed.swift; sourceTree = "<group>"; }; 845EE7C01FC2488C00854A1F /* SmartFeed.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SmartFeed.swift; sourceTree = "<group>"; };
845F3D2B2BC268FE00AEBB68 /* CloudKitSync */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = CloudKitSync; sourceTree = "<group>"; }; 845F3D2B2BC268FE00AEBB68 /* CloudKitSync */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = CloudKitSync; sourceTree = "<group>"; };
846133952BFDA8BC00EE2D05 /* ParserObjC */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = ParserObjC; sourceTree = "<group>"; };
846799F42BBD120A000854CB /* Parser */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = Parser; sourceTree = "<group>"; }; 846799F42BBD120A000854CB /* Parser */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = Parser; sourceTree = "<group>"; };
84702AA31FA27AC0006B8943 /* MarkStatusCommand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MarkStatusCommand.swift; sourceTree = "<group>"; }; 84702AA31FA27AC0006B8943 /* MarkStatusCommand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MarkStatusCommand.swift; sourceTree = "<group>"; };
847120D62B8AE6AF00BBFC34 /* UTType+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UTType+Extensions.swift"; sourceTree = "<group>"; }; 847120D62B8AE6AF00BBFC34 /* UTType+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UTType+Extensions.swift"; sourceTree = "<group>"; };
@ -2005,6 +2006,7 @@
841550F52B9E4D6800D4B345 /* FMDB */, 841550F52B9E4D6800D4B345 /* FMDB */,
849FEDC32BBB225E0053FB21 /* Web */, 849FEDC32BBB225E0053FB21 /* Web */,
846799F42BBD120A000854CB /* Parser */, 846799F42BBD120A000854CB /* Parser */,
846133952BFDA8BC00EE2D05 /* ParserObjC */,
84DCA5232BABBA8100792720 /* Core */, 84DCA5232BABBA8100792720 /* Core */,
841CECD62BAD03C60001EE72 /* Tree */, 841CECD62BAD03C60001EE72 /* Tree */,
84DCA5102BABB6A100792720 /* UIKitExtras */, 84DCA5102BABB6A100792720 /* UIKitExtras */,

View File

@ -12,12 +12,9 @@ let package = Package(
name: "Parser", name: "Parser",
type: .dynamic, type: .dynamic,
targets: ["Parser"]), targets: ["Parser"]),
.library(
name: "ParserObjC",
type: .dynamic,
targets: ["ParserObjC"]),
], ],
dependencies: [ dependencies: [
.package(path: "../ParserObjC"),
], ],
targets: [ targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite. // Targets are the basic building blocks of a package. A target can define a module or a test suite.
@ -25,20 +22,12 @@ let package = Package(
.target( .target(
name: "Parser", name: "Parser",
dependencies: ["ParserObjC"], dependencies: ["ParserObjC"],
path: "Sources/Swift",
swiftSettings: [ swiftSettings: [
.enableExperimentalFeature("StrictConcurrency") .enableExperimentalFeature("StrictConcurrency")
]), ]),
.target(
name: "ParserObjC",
dependencies: [],
path: "Sources/ObjC",
cSettings: [
.headerSearchPath("include")
]),
.testTarget( .testTarget(
name: "ParserTests", name: "ParserTests",
dependencies: ["Parser"], dependencies: ["Parser", "ParserObjC"],
exclude: ["Info.plist"], exclude: ["Info.plist"],
resources: [.copy("Resources")]), resources: [.copy("Resources")]),
] ]

View File

@ -6,5 +6,6 @@
// //
import Foundation import Foundation
import ParserObjC
extension ParserData: @unchecked Sendable {} extension ParserData: @unchecked Sendable {}

View File

@ -6,5 +6,6 @@
// //
import Foundation import Foundation
import ParserObjC
extension RSHTMLMetadataParser: @unchecked Sendable {} extension RSHTMLMetadataParser: @unchecked Sendable {}

View File

@ -1,9 +0,0 @@
//
// Exports.swift
//
//
// Created by Stuart Breckenridge on 29/7/20.
//
import Foundation
@_exported import ParserObjC

8
ParserObjc/.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
.DS_Store
/.build
/Packages
xcuserdata/
DerivedData/
.swiftpm/configuration/registries.json
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
.netrc

26
ParserObjc/Package.swift Normal file
View File

@ -0,0 +1,26 @@
// swift-tools-version: 5.10
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "ParserObjC",
platforms: [.macOS(.v14), .iOS(.v17)],
products: [
// Products define the executables and libraries a package produces, making them visible to other packages.
.library(
name: "ParserObjC",
type: .dynamic,
targets: ["ParserObjC"]),
],
targets: [
// Targets are the basic building blocks of a package, defining a module or a test suite.
// Targets can depend on other targets in this package and products from dependencies.
.target(
name: "ParserObjC",
cSettings: [
.headerSearchPath("include")
]
),
]
)

View File

@ -9,6 +9,7 @@
import Foundation import Foundation
import Web import Web
import Parser import Parser
import ParserObjC
extension RSHTMLMetadata: @unchecked Sendable {} extension RSHTMLMetadata: @unchecked Sendable {}