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: [
.package(path: "../Parser"),
.package(path: "../ParserObjC"),
.package(path: "../Articles"),
.package(path: "../ArticlesDatabase"),
.package(path: "../Web"),
@ -33,6 +34,7 @@ let package = Package(
name: "Account",
dependencies: [
"Parser",
"ParserObjC",
"Web",
"Articles",
"ArticlesDatabase",

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -9,6 +9,7 @@
import Foundation
import CoreServices
import Parser
import ParserObjC
import UniformTypeIdentifiers
// 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 Web
import Parser
import ParserObjC
import Core
public extension Notification.Name {

View File

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

View File

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

View File

@ -1023,6 +1023,7 @@
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>"; };
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>"; };
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>"; };
@ -2005,6 +2006,7 @@
841550F52B9E4D6800D4B345 /* FMDB */,
849FEDC32BBB225E0053FB21 /* Web */,
846799F42BBD120A000854CB /* Parser */,
846133952BFDA8BC00EE2D05 /* ParserObjC */,
84DCA5232BABBA8100792720 /* Core */,
841CECD62BAD03C60001EE72 /* Tree */,
84DCA5102BABB6A100792720 /* UIKitExtras */,

View File

@ -12,12 +12,9 @@ let package = Package(
name: "Parser",
type: .dynamic,
targets: ["Parser"]),
.library(
name: "ParserObjC",
type: .dynamic,
targets: ["ParserObjC"]),
],
dependencies: [
.package(path: "../ParserObjC"),
],
targets: [
// 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(
name: "Parser",
dependencies: ["ParserObjC"],
path: "Sources/Swift",
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency")
]),
.target(
name: "ParserObjC",
dependencies: [],
path: "Sources/ObjC",
cSettings: [
.headerSearchPath("include")
]),
.testTarget(
name: "ParserTests",
dependencies: ["Parser"],
dependencies: ["Parser", "ParserObjC"],
exclude: ["Info.plist"],
resources: [.copy("Resources")]),
]

View File

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

View File

@ -6,5 +6,6 @@
//
import Foundation
import ParserObjC
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 Web
import Parser
import ParserObjC
extension RSHTMLMetadata: @unchecked Sendable {}