Simplify Parser — use one target instead of multiple.
This commit is contained in:
parent
c48e72c3b2
commit
591e451b69
@ -1,67 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1530"
|
||||
version = "1.7">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES"
|
||||
buildArchitectures = "Automatic">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "OPMLParser"
|
||||
BuildableName = "OPMLParser"
|
||||
BlueprintName = "OPMLParser"
|
||||
ReferencedContainer = "container:">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
shouldAutocreateTestPlan = "YES">
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "OPMLParser"
|
||||
BuildableName = "OPMLParser"
|
||||
BlueprintName = "OPMLParser"
|
||||
ReferencedContainer = "container:">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
@ -1,67 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1530"
|
||||
version = "1.7">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES"
|
||||
buildArchitectures = "Automatic">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "SAX"
|
||||
BuildableName = "SAX"
|
||||
BlueprintName = "SAX"
|
||||
ReferencedContainer = "container:">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
shouldAutocreateTestPlan = "YES">
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "SAX"
|
||||
BuildableName = "SAX"
|
||||
BlueprintName = "SAX"
|
||||
ReferencedContainer = "container:">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
@ -9,25 +9,9 @@ let package = Package(
|
||||
products: [
|
||||
// Products define the executables and libraries a package produces, and make them visible to other packages.
|
||||
.library(
|
||||
name: "FeedParser",
|
||||
name: "Parser",
|
||||
type: .dynamic,
|
||||
targets: ["FeedParser"]),
|
||||
.library(
|
||||
name: "SAX",
|
||||
type: .dynamic,
|
||||
targets: ["SAX"]),
|
||||
.library(
|
||||
name: "OPMLParser",
|
||||
type: .dynamic,
|
||||
targets: ["OPMLParser"]),
|
||||
.library(
|
||||
name: "HTMLParser",
|
||||
type: .dynamic,
|
||||
targets: ["HTMLParser"]),
|
||||
.library(
|
||||
name: "DateParser",
|
||||
type: .dynamic,
|
||||
targets: ["DateParser"])
|
||||
targets: ["Parser"])
|
||||
],
|
||||
dependencies: [
|
||||
.package(path: "../FoundationExtras"),
|
||||
@ -36,53 +20,17 @@ let package = Package(
|
||||
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
|
||||
// Targets can depend on other targets in this package, and on products in packages this package depends on.
|
||||
.target(
|
||||
name: "OPMLParser",
|
||||
dependencies: [
|
||||
"SAX"
|
||||
],
|
||||
swiftSettings: [
|
||||
.enableExperimentalFeature("StrictConcurrency")
|
||||
]),
|
||||
.target(
|
||||
name: "HTMLParser",
|
||||
name: "Parser",
|
||||
dependencies: [
|
||||
"FoundationExtras",
|
||||
"SAX"
|
||||
],
|
||||
swiftSettings: [
|
||||
.enableExperimentalFeature("StrictConcurrency")
|
||||
]),
|
||||
.target(
|
||||
name: "FeedParser",
|
||||
dependencies: [
|
||||
"SAX",
|
||||
"FoundationExtras",
|
||||
"DateParser"
|
||||
],
|
||||
swiftSettings: [
|
||||
.enableExperimentalFeature("StrictConcurrency")
|
||||
]),
|
||||
.target(
|
||||
name: "SAX",
|
||||
dependencies: [
|
||||
"FoundationExtras"
|
||||
],
|
||||
swiftSettings: [
|
||||
.enableExperimentalFeature("StrictConcurrency")
|
||||
]),
|
||||
.target(
|
||||
name: "DateParser",
|
||||
dependencies: [],
|
||||
swiftSettings: [
|
||||
.enableExperimentalFeature("StrictConcurrency")
|
||||
]),
|
||||
.testTarget(
|
||||
name: "ParserTests",
|
||||
dependencies: [
|
||||
"FeedParser",
|
||||
"OPMLParser",
|
||||
"DateParser",
|
||||
"HTMLParser"
|
||||
"Parser"
|
||||
],
|
||||
exclude: ["Info.plist"],
|
||||
resources: [.copy("Resources")]),
|
||||
|
@ -7,7 +7,6 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import SAX
|
||||
|
||||
public enum FeedType: Sendable {
|
||||
|
@ -7,8 +7,6 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import SAX
|
||||
import DateParser
|
||||
|
||||
// See https://jsonfeed.org/version/1.1
|
||||
|
@ -7,8 +7,6 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import SAX
|
||||
import DateParser
|
||||
|
||||
// See https://github.com/scripting/Scripting-News/blob/master/rss-in-json/README.md
|
||||
// Also: http://cyber.harvard.edu/rss/rss.html
|
@ -8,8 +8,6 @@
|
||||
|
||||
import Foundation
|
||||
import FoundationExtras
|
||||
import SAX
|
||||
import DateParser
|
||||
|
||||
final class AtomParser {
|
||||
|
@ -8,8 +8,6 @@
|
||||
|
||||
import Foundation
|
||||
import FoundationExtras
|
||||
import SAX
|
||||
import DateParser
|
||||
|
||||
public final class RSSParser {
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
import FoundationExtras
|
||||
import SAX
|
||||
|
||||
public final class HTMLLinkParser {
|
||||
|
@ -6,7 +6,6 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import SAX
|
||||
|
||||
public final class HTMLMetadata {
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
import FoundationExtras
|
||||
import SAX
|
||||
|
||||
public final class HTMLMetadataParser {
|
||||
|
@ -6,7 +6,6 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import SAX
|
||||
|
||||
public struct OPMLFeedSpecifier: Sendable {
|
||||
|
@ -6,7 +6,6 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import SAX
|
||||
|
||||
public final class OPMLParser {
|
||||
|
@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
import XCTest
|
||||
import FeedParser
|
||||
import Parser
|
||||
|
||||
final class AtomParserTests: XCTestCase {
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import XCTest
|
||||
@testable import DateParser
|
||||
@testable import Parser
|
||||
|
||||
final class DateParserTests: XCTestCase {
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
import XCTest
|
||||
import SAX
|
||||
import Parser
|
||||
|
||||
final class EntityDecodingTests: XCTestCase {
|
||||
|
||||
|
@ -7,8 +7,7 @@
|
||||
//
|
||||
|
||||
import XCTest
|
||||
@testable import FeedParser
|
||||
import SAX
|
||||
@testable import Parser
|
||||
|
||||
final class FeedParserTypeTests: XCTestCase {
|
||||
|
||||
|
@ -7,8 +7,7 @@
|
||||
//
|
||||
|
||||
import XCTest
|
||||
import HTMLParser
|
||||
import libxml2
|
||||
import Parser
|
||||
|
||||
final class HTMLLinkTests: XCTestCase {
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
import XCTest
|
||||
import HTMLParser
|
||||
import Parser
|
||||
|
||||
final class HTMLMetadataTests: XCTestCase {
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
import XCTest
|
||||
import FeedParser
|
||||
import Parser
|
||||
|
||||
final class JSONFeedParserTests: XCTestCase {
|
||||
|
||||
|
@ -7,8 +7,7 @@
|
||||
//
|
||||
|
||||
import XCTest
|
||||
import SAX
|
||||
@testable import OPMLParser
|
||||
@testable import Parser
|
||||
|
||||
final class OPMLTests: XCTestCase {
|
||||
|
||||
|
@ -7,8 +7,7 @@
|
||||
//
|
||||
|
||||
import XCTest
|
||||
import SAX
|
||||
import FeedParser
|
||||
import Parser
|
||||
|
||||
final class RSSInJSONParserTests: XCTestCase {
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
import XCTest
|
||||
import FeedParser
|
||||
import Parser
|
||||
|
||||
final class RSSParserTests: XCTestCase {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user