Skip to content

Commit

Permalink
0.36.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dankinsoid committed Aug 27, 2024
1 parent bbff753 commit a33fd12
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 30 deletions.
10 changes: 4 additions & 6 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@ let package = Package(
],
products: [
.library(name: "VDStore", targets: ["VDStore"]),
.library(name: "VDStoreTestUtils", targets: ["VDStoreTestUtils"]),
],
dependencies: [
],
targets: [
.target(
name: "VDStore",
dependencies: [
]
),
.testTarget(name: "VDStoreTests", dependencies: ["VDStore"]),
.target(name: "VDStore", dependencies: []),
.target(name: "VDStoreTestUtils", dependencies: ["VDStore"]),
.testTarget(name: "VDStoreTests", dependencies: ["VDStoreTestUtils"]),
]
)
4 changes: 3 additions & 1 deletion [email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ let package = Package(
],
products: [
.library(name: "VDStore", targets: ["VDStore"]),
.library(name: "VDStoreTestUtils", targets: ["VDStoreTestUtils"]),
],
dependencies: [
.package(url: "https://github.com/apple/swift-syntax.git", from: "509.0.2"),
Expand All @@ -27,6 +28,7 @@ let package = Package(
.product(name: "SwiftCompilerPlugin", package: "swift-syntax"),
]
),
.testTarget(name: "VDStoreTests", dependencies: ["VDStore"]),
.target(name: "VDStoreTestUtils", dependencies: ["VDStore"]),
.testTarget(name: "VDStoreTests", dependencies: ["VDStoreTestUtils"]),
]
)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ import PackageDescription
let package = Package(
name: "SomeProject",
dependencies: [
.package(url: "https://github.com/dankinsoid/VDStore.git", from: "0.35.0")
.package(url: "https://github.com/dankinsoid/VDStore.git", from: "0.36.0")
],
targets: [
.target(name: "SomeProject", dependencies: ["VDStore"])
Expand Down
35 changes: 13 additions & 22 deletions Sources/VDStore/Utils/RuntimeWarnings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,24 @@ func runtimeWarn(
_ message: @autoclosure () -> String,
category: String? = "VDStore"
) {
#if DEBUG
#if DEBUG
let message = message()
let category = category ?? "Runtime Warning"
if _XCTIsTesting {
#if canImport(XCTest)
XCTFail(message)
#endif
} else {
#if canImport(os)
os_log(
.fault,
dso: dso,
log: OSLog(subsystem: "com.apple.runtime-issues", category: category),
"%@",
message
)
#else
fputs("\(formatter.string(from: Date())) [\(category)] \(message)\n", stderr)
#endif
}
#endif
#if canImport(os)
os_log(
.fault,
dso: dso,
log: OSLog(subsystem: "com.apple.runtime-issues", category: category),
"%@",
message
)
#else
fputs("\(formatter.string(from: Date())) [\(category)] \(message)\n", stderr)
#endif
#endif
}

#if DEBUG
#if canImport(XCTest)
import XCTest
#endif

#if canImport(os)
import os
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#if canImport(XCTest)
import Foundation
import XCTest
@_exported import VDStore

public final class TestMiddleware: StoreMiddleware {

Expand Down

0 comments on commit a33fd12

Please sign in to comment.