Skip to content

Commit

Permalink
Import more precisely
Browse files Browse the repository at this point in the history
  • Loading branch information
sushichop committed Jan 31, 2022
1 parent 90e2ab1 commit 814a219
Show file tree
Hide file tree
Showing 18 changed files with 18 additions and 23 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- Add suffix extension types for `FileRotationLogger`. [#32](https://github.com/sushichop/Puppy/pull/32)
- FileRotationLoggerDelegate Fix Spelling. [#34](https://github.com/sushichop/Puppy/pull/34)
- Add option for file permission. [#36](https://github.com/sushichop/Puppy/pull/36)
- Import more precisely. [#38](https://github.com/sushichop/Puppy/pull/38)

## [0.3.1](https://github.com/sushichop/Puppy/releases/tag/0.3.1) (2021-08-18)

Expand Down
3 changes: 1 addition & 2 deletions Puppy.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Pod::Spec.new do |s|
s.source = { :git => "https://github.com/sushichop/Puppy.git", :tag => "#{s.version}" }

s.default_subspec = "Default"
s.preserve_paths = "Sources/CPuppy/**/*"

s.subspec "Default" do |default|
default.dependency "Puppy/Core"
Expand All @@ -24,7 +23,7 @@ Pod::Spec.new do |s|
s.subspec "Core" do |core|
core.header_mappings_dir = "Sources/CPuppy/include"
core.public_header_files = "Sources/CPuppy/include/**/*.h"
core.source_files = "Sources/CPuppy/**/*.{h,m}", "Sources/Puppy/**/*.{swift}"
core.source_files = "Sources/CPuppy/**/*.{h,c}", "Sources/Puppy/**/*.{swift}"
end

s.test_spec "UnitTests" do |unit_tests|
Expand Down
2 changes: 2 additions & 0 deletions Puppy.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
C74F94C826778428003A88BE /* CPuppy.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C74F94A926777D38003A88BE /* CPuppy.framework */; };
C7695BB42533303900E0CA22 /* MockLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7695BB32533303900E0CA22 /* MockLogger.swift */; };
C7695BC2253332DF00E0CA22 /* BaseLoggerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7695BC1253332DF00E0CA22 /* BaseLoggerTests.swift */; };
C789CB8E27A81146001C7589 /* CPuppy.c in Sources */ = {isa = PBXBuildFile; fileRef = C712BB0B266F31C80016A768 /* CPuppy.c */; };
C7C3C7AF26D51D6E00856A45 /* Logging in Frameworks */ = {isa = PBXBuildFile; productRef = C7C3C7AE26D51D6E00856A45 /* Logging */; };
C7ED71A8252DBEC70065B955 /* Puppy.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C7ED719E252DBEC70065B955 /* Puppy.framework */; };
C7ED71FC252DC0C50065B955 /* FileRotationLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7ED71F0252DC0C50065B955 /* FileRotationLogger.swift */; };
Expand Down Expand Up @@ -505,6 +506,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
C789CB8E27A81146001C7589 /* CPuppy.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
2 changes: 1 addition & 1 deletion Sources/CPuppy/CPuppy.modulemap
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
framework module CPuppy {
umbrella header "include/CPuppy.h"
umbrella header "CPuppy.h"
export *
module * { export * }
}
1 change: 0 additions & 1 deletion Sources/Puppy/OSLogger.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if canImport(Darwin)

import Foundation
import os.log

Expand Down
5 changes: 2 additions & 3 deletions Sources/Puppy/Puppy.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import Foundation
#if os(Linux)
import CPuppy
import func CPuppy.cpuppy_sys_gettid
#endif

import Foundation

typealias Log = Puppy

public class Puppy {
Expand Down
1 change: 0 additions & 1 deletion Sources/Puppy/PuppyLogHandler.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if canImport(Logging)

import Foundation
import Logging

Expand Down
3 changes: 1 addition & 2 deletions Sources/Puppy/SystemLogger.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#if os(Linux)

import Foundation
import CPuppy
import func CPuppy.cpuppy_syslog

public class SystemLogger: BaseLogger {

Expand Down
2 changes: 1 addition & 1 deletion Tests/PuppyTests/BaseLoggerTests.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import XCTest
@testable import Puppy
import Puppy

final class BaseLoggerTests: XCTestCase {

Expand Down
2 changes: 1 addition & 1 deletion Tests/PuppyTests/FileLoggerTests.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import XCTest
@testable import Puppy
import Puppy

final class FileLoggerTests: XCTestCase {

Expand Down
2 changes: 1 addition & 1 deletion Tests/PuppyTests/FileRotationLoggerTests.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import XCTest
@testable import Puppy
import Puppy

final class FileRotationLoggerTests: XCTestCase {

Expand Down
2 changes: 1 addition & 1 deletion Tests/PuppyTests/FormatterTests.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import XCTest
@testable import Puppy
import Puppy
#if canImport(Logging)
import Logging
#endif
Expand Down
2 changes: 1 addition & 1 deletion Tests/PuppyTests/MockLogger.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
@testable import Puppy
import Puppy

final public class MockLogger: BaseLogger {

Expand Down
3 changes: 1 addition & 2 deletions Tests/PuppyTests/OSLoggerTests.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#if canImport(Darwin)

import XCTest
@testable import Puppy
import Puppy

final class OSLoggerTests: XCTestCase {

Expand Down
3 changes: 1 addition & 2 deletions Tests/PuppyTests/PuppyLogHandlerTests.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#if canImport(Logging)

import XCTest
@testable import Puppy
import Puppy
import Logging

final class PuppyLogHandlerTests: XCTestCase {
Expand Down
2 changes: 1 addition & 1 deletion Tests/PuppyTests/PuppyTests.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import XCTest
@testable import Puppy
import Puppy

final class PuppyTests: XCTestCase {

Expand Down
3 changes: 1 addition & 2 deletions Tests/PuppyTests/SystemLoggerTests.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#if os(Linux)

import XCTest
@testable import Puppy
import Puppy

final class SystemLoggerTests: XCTestCase {

Expand Down
2 changes: 1 addition & 1 deletion scripts/llvm-cov-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if [ "${SCRIPT_TYPE}" = "export" ]; then
fi

swift package clean
swift test --enable-test-discovery --enable-code-coverage
swift test --enable-code-coverage

BIN_PATH="$(swift build --show-bin-path)"
XCTEST_PATH="$(find ${BIN_PATH} -name '*.xctest')"
Expand Down

0 comments on commit 814a219

Please sign in to comment.