diff --git a/Sources/Yams/Constructor.swift b/Sources/Yams/Constructor.swift index 236403f6..3c1af585 100644 --- a/Sources/Yams/Constructor.swift +++ b/Sources/Yams/Constructor.swift @@ -445,7 +445,7 @@ private extension Substring { extension Constructor { @available(*, unavailable, message: "Use `Constructor.ScalarMap` instead") public typealias Map = [Tag.Name: (Node) -> Any?] - + @available(*, unavailable, message: "Use `Constructor.defaultScalarMap` instead") public static let defaultMap: ScalarMap = [:] } diff --git a/Sources/Yams/Decoder.swift b/Sources/Yams/Decoder.swift index 6c84727b..d9ff4906 100644 --- a/Sources/Yams/Decoder.swift +++ b/Sources/Yams/Decoder.swift @@ -88,9 +88,7 @@ private struct _Decoder: Decoder { } } -private struct _KeyedDecodingContainer : KeyedDecodingContainerProtocol { - - typealias Key = K +private struct _KeyedDecodingContainer : KeyedDecodingContainerProtocol { private let decoder: _Decoder private let mapping: Node.Mapping diff --git a/Sources/Yams/Encoder.swift b/Sources/Yams/Encoder.swift index b60dfb84..6f89e76e 100644 --- a/Sources/Yams/Encoder.swift +++ b/Sources/Yams/Encoder.swift @@ -146,8 +146,7 @@ private class _ReferencingEncoder: _Encoder { } } -private struct _KeyedEncodingContainer : KeyedEncodingContainerProtocol { - typealias Key = K +private struct _KeyedEncodingContainer : KeyedEncodingContainerProtocol { private let encoder: _Encoder diff --git a/Tests/YamsTests/EncoderTests.swift b/Tests/YamsTests/EncoderTests.swift index e27c89e8..103c640c 100644 --- a/Tests/YamsTests/EncoderTests.swift +++ b/Tests/YamsTests/EncoderTests.swift @@ -13,7 +13,7 @@ import Yams // swiftlint:disable identifier_name line_length /// Tests are copied from https://github.com/apple/swift/blob/master/test/stdlib/TestJSONEncoder.swift -class EncoderTests: XCTestCase { +class EncoderTests: XCTestCase { // swiftlint:disable:this type_body_length // MARK: - Encoding Top-Level Empty Types func testEncodingTopLevelEmptyStruct() { let empty = EmptyStruct() diff --git a/Yams.xcodeproj/CYaml_Info.plist b/Yams.xcodeproj/CYaml_Info.plist deleted file mode 100644 index e04b80ea..00000000 --- a/Yams.xcodeproj/CYaml_Info.plist +++ /dev/null @@ -1,25 +0,0 @@ - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 0.1.7 - CFBundleSignature - ???? - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/Yams.xcodeproj/project.pbxproj b/Yams.xcodeproj/project.pbxproj index ccf3412a..42127b7c 100644 --- a/Yams.xcodeproj/project.pbxproj +++ b/Yams.xcodeproj/project.pbxproj @@ -289,7 +289,7 @@ OBJ_1 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0900; + LastUpgradeCheck = 0930; TargetAttributes = { OBJ_45 = { LastSwiftMigration = 0900; @@ -402,11 +402,13 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; @@ -450,11 +452,13 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; @@ -492,20 +496,15 @@ buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; ENABLE_TESTABILITY = YES; INFOPLIST_FILE = Yams.xcodeproj/Yams_Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; - OTHER_LDFLAGS = "$(inherited)"; - OTHER_SWIFT_FLAGS = "$(inherited)"; PRODUCT_BUNDLE_IDENTIFIER = Yams; PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = ""; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; TARGET_NAME = Yams; WARNING_CFLAGS = "-Wall"; }; @@ -516,20 +515,15 @@ buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; ENABLE_TESTABILITY = YES; INFOPLIST_FILE = Yams.xcodeproj/Yams_Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; - OTHER_LDFLAGS = "$(inherited)"; - OTHER_SWIFT_FLAGS = "$(inherited)"; PRODUCT_BUNDLE_IDENTIFIER = Yams; PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = ""; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; TARGET_NAME = Yams; WARNING_CFLAGS = "-Wall"; }; @@ -540,13 +534,9 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_WEAK = YES; INFOPLIST_FILE = Yams.xcodeproj/YamsTests_Info.plist; LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @loader_path/Frameworks"; - OTHER_LDFLAGS = "$(inherited)"; - OTHER_SWIFT_FLAGS = "$(inherited)"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = ""; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; TARGET_NAME = YamsTests; }; name = Debug; @@ -556,13 +546,9 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_WEAK = YES; INFOPLIST_FILE = Yams.xcodeproj/YamsTests_Info.plist; LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @loader_path/Frameworks"; - OTHER_LDFLAGS = "$(inherited)"; - OTHER_SWIFT_FLAGS = "$(inherited)"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = ""; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; TARGET_NAME = YamsTests; }; name = Release; diff --git a/Yams.xcodeproj/xcshareddata/xcschemes/Yams.xcscheme b/Yams.xcodeproj/xcshareddata/xcschemes/Yams.xcscheme index 4e57e103..a632accc 100644 --- a/Yams.xcodeproj/xcshareddata/xcschemes/Yams.xcscheme +++ b/Yams.xcodeproj/xcshareddata/xcschemes/Yams.xcscheme @@ -1,6 +1,6 @@