diff --git a/DevTools/CollectTests.awk b/DevTools/CollectTests.awk index 9f4990c0f..1f6e6cad4 100644 --- a/DevTools/CollectTests.awk +++ b/DevTools/CollectTests.awk @@ -38,7 +38,7 @@ BEGIN { printf("\n") printf("import XCTest\n") printf("@testable import SwiftProtobufTests\n") - printf("@testable import PluginLibraryTests\n") + printf("@testable import SwiftProtobufPluginLibraryTests\n") printf("\n") } diff --git a/Documentation/PLUGIN.md b/Documentation/PLUGIN.md index 94e7b68e2..61fdcff51 100644 --- a/Documentation/PLUGIN.md +++ b/Documentation/PLUGIN.md @@ -139,7 +139,7 @@ $ protoc --swift_opt=ProtoPathModuleMappings=[path.asciipb] --swift_out=. foo/ba ``` The format of that mapping file is defined in -[swift_protobuf_module_mappings.proto](../Protos/PluginLibrary/swift_protobuf_module_mappings.proto), +[swift_protobuf_module_mappings.proto](../Protos/SwiftProtobufPluginLibrary/swift_protobuf_module_mappings.proto), and files would look something like: ``` diff --git a/Makefile b/Makefile index 8875f9935..c8d9e9985 100644 --- a/Makefile +++ b/Makefile @@ -157,7 +157,7 @@ LIBRARY_PROTOS= \ PLUGIN_PROTOS= \ Protos/google/protobuf/compiler/plugin.proto \ Protos/google/protobuf/descriptor.proto \ - Protos/PluginLibrary/swift_protobuf_module_mappings.proto + Protos/SwiftProtobufPluginLibrary/swift_protobuf_module_mappings.proto # Protos that are used by the conformance test runner. CONFORMANCE_PROTOS= \ @@ -372,7 +372,7 @@ regenerate: \ regenerate-plugin-protos \ regenerate-test-protos \ regenerate-conformance-protos \ - Tests/PluginLibraryTests/DescriptorTestData.swift + Tests/SwiftProtobufPluginLibraryTests/DescriptorTestData.swift # Rebuild just the protos included in the runtime library regenerate-library-protos: build ${PROTOC_GEN_SWIFT} @@ -387,7 +387,7 @@ regenerate-plugin-protos: build ${PROTOC_GEN_SWIFT} ${GENERATE_SRCS} \ --tfiws_opt=FileNaming=DropPath \ --tfiws_opt=Visibility=Public \ - --tfiws_out=Sources/PluginLibrary \ + --tfiws_out=Sources/SwiftProtobufPluginLibrary \ ${PLUGIN_PROTOS} # Rebuild just the protos used by the runtime test suite @@ -400,7 +400,7 @@ regenerate-test-protos: build ${PROTOC_GEN_SWIFT} Protos/generated_swift_names_e --tfiws_out=Tests/SwiftProtobufTests \ ${TEST_PROTOS} -Tests/PluginLibraryTests/DescriptorTestData.swift: build ${PROTOC_GEN_SWIFT} ${SWIFT_DESCRIPTOR_TEST_PROTOS} +Tests/SwiftProtobufPluginLibraryTests/DescriptorTestData.swift: build ${PROTOC_GEN_SWIFT} ${SWIFT_DESCRIPTOR_TEST_PROTOS} @${PROTOC} \ --include_imports \ --descriptor_set_out=DescriptorTestData.bin \ diff --git a/Package.swift b/Package.swift index addee9c0f..69139520d 100644 --- a/Package.swift +++ b/Package.swift @@ -12,10 +12,10 @@ import PackageDescription let package = Package( name: "SwiftProtobuf", targets: [ - Target(name: "PluginLibrary", + Target(name: "SwiftProtobufPluginLibrary", dependencies: ["SwiftProtobuf"]), Target(name: "protoc-gen-swift", - dependencies: ["PluginLibrary", "SwiftProtobuf"]), + dependencies: ["SwiftProtobufPluginLibrary", "SwiftProtobuf"]), Target(name: "Conformance", dependencies: ["SwiftProtobuf"]), ] diff --git a/Package@swift-4.swift b/Package@swift-4.swift index 7cf5f4cf2..0d5a87243 100644 --- a/Package@swift-4.swift +++ b/Package@swift-4.swift @@ -16,19 +16,20 @@ let package = Package( products: [ .executable(name: "protoc-gen-swift", targets: ["protoc-gen-swift"]), .library(name: "SwiftProtobuf", type: .static, targets: ["SwiftProtobuf"]), + .library(name: "SwiftProtobufPluginLibrary", targets: ["SwiftProtobufPluginLibrary"]), ], targets: [ .target(name: "SwiftProtobuf"), - .target(name: "PluginLibrary", + .target(name: "SwiftProtobufPluginLibrary", dependencies: ["SwiftProtobuf"]), .target(name: "protoc-gen-swift", - dependencies: ["PluginLibrary", "SwiftProtobuf"]), + dependencies: ["SwiftProtobufPluginLibrary", "SwiftProtobuf"]), .target(name: "Conformance", dependencies: ["SwiftProtobuf"]), .testTarget(name: "SwiftProtobufTests", dependencies: ["SwiftProtobuf"]), - .testTarget(name: "PluginLibraryTests", - dependencies: ["PluginLibrary"]), + .testTarget(name: "SwiftProtobufPluginLibraryTests", + dependencies: ["SwiftProtobufPluginLibrary"]), ], swiftLanguageVersions: [3, 4] ) diff --git a/Protos/PluginLibrary/swift_protobuf_module_mappings.proto b/Protos/SwiftProtobufPluginLibrary/swift_protobuf_module_mappings.proto similarity index 91% rename from Protos/PluginLibrary/swift_protobuf_module_mappings.proto rename to Protos/SwiftProtobufPluginLibrary/swift_protobuf_module_mappings.proto index 329967366..e1f8a1bc9 100644 --- a/Protos/PluginLibrary/swift_protobuf_module_mappings.proto +++ b/Protos/SwiftProtobufPluginLibrary/swift_protobuf_module_mappings.proto @@ -1,4 +1,4 @@ -// Protos/PluginLibrary/swift_protobuf_module_mappings.proto - Swift Module mappings configuration +// Protos/SwiftProtobufPluginLibrary/swift_protobuf_module_mappings.proto - Swift Module mappings configuration // // This source file is part of the Swift.org open source project // diff --git a/Protos/pluginlib_descriptor_test.proto b/Protos/pluginlib_descriptor_test.proto index 830bdedec..a7e691a90 100644 --- a/Protos/pluginlib_descriptor_test.proto +++ b/Protos/pluginlib_descriptor_test.proto @@ -10,7 +10,7 @@ // // ----------------------------------------------------------------------------- /// -/// Test proto for Tests/PluginLibraryTests/Test_Descriptor.swift +/// Test proto for Tests/SwiftProtobufPluginLibraryTests/Test_Descriptor.swift /// // ----------------------------------------------------------------------------- diff --git a/Reference/PluginLibrary/swift_protobuf_module_mappings.pb.swift b/Reference/SwiftProtobufPluginLibrary/swift_protobuf_module_mappings.pb.swift similarity index 96% rename from Reference/PluginLibrary/swift_protobuf_module_mappings.pb.swift rename to Reference/SwiftProtobufPluginLibrary/swift_protobuf_module_mappings.pb.swift index 3e8f62c1a..c94fb15e3 100644 --- a/Reference/PluginLibrary/swift_protobuf_module_mappings.pb.swift +++ b/Reference/SwiftProtobufPluginLibrary/swift_protobuf_module_mappings.pb.swift @@ -1,12 +1,12 @@ // DO NOT EDIT. // // Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: PluginLibrary/swift_protobuf_module_mappings.proto +// Source: SwiftProtobufPluginLibrary/swift_protobuf_module_mappings.proto // // For information on using the generated types, please see the documenation: // https://github.com/apple/swift-protobuf/ -// Protos/PluginLibrary/swift_protobuf_module_mappings.proto - Swift Module mappings configuration +// Protos/SwiftProtobufPluginLibrary/swift_protobuf_module_mappings.proto - Swift Module mappings configuration // // This source file is part of the Swift.org open source project // diff --git a/Reference/pluginlib_descriptor_test.pb.swift b/Reference/pluginlib_descriptor_test.pb.swift index 2ba7e0d26..1880d688b 100644 --- a/Reference/pluginlib_descriptor_test.pb.swift +++ b/Reference/pluginlib_descriptor_test.pb.swift @@ -18,7 +18,7 @@ // // ----------------------------------------------------------------------------- /// -/// Test proto for Tests/PluginLibraryTests/Test_Descriptor.swift +/// Test proto for Tests/SwiftProtobufPluginLibraryTests/Test_Descriptor.swift /// // ----------------------------------------------------------------------------- diff --git a/Sources/PluginLibrary/Array+Extensions.swift b/Sources/SwiftProtobufPluginLibrary/Array+Extensions.swift similarity index 93% rename from Sources/PluginLibrary/Array+Extensions.swift rename to Sources/SwiftProtobufPluginLibrary/Array+Extensions.swift index bec466309..1d0c91c23 100644 --- a/Sources/PluginLibrary/Array+Extensions.swift +++ b/Sources/SwiftProtobufPluginLibrary/Array+Extensions.swift @@ -1,4 +1,4 @@ -// Sources/PluginLibrary/Array+Extensions.swift - Additions to Arrays +// Sources/SwiftProtobufPluginLibrary/Array+Extensions.swift - Additions to Arrays // // Copyright (c) 2014 - 2017 Apple Inc. and the project authors // Licensed under Apache License v2.0 with Runtime Library Exception diff --git a/Sources/PluginLibrary/CodePrinter.swift b/Sources/SwiftProtobufPluginLibrary/CodePrinter.swift similarity index 97% rename from Sources/PluginLibrary/CodePrinter.swift rename to Sources/SwiftProtobufPluginLibrary/CodePrinter.swift index 0e9f880f8..db92e77ed 100644 --- a/Sources/PluginLibrary/CodePrinter.swift +++ b/Sources/SwiftProtobufPluginLibrary/CodePrinter.swift @@ -1,4 +1,4 @@ -// Sources/PluginLibrary/CodePrinter.swift - Code output +// Sources/SwiftProtobufPluginLibrary/CodePrinter.swift - Code output // // Copyright (c) 2014 - 2016 Apple Inc. and the project authors // Licensed under Apache License v2.0 with Runtime Library Exception diff --git a/Sources/PluginLibrary/Descriptor+Extensions.swift b/Sources/SwiftProtobufPluginLibrary/Descriptor+Extensions.swift similarity index 97% rename from Sources/PluginLibrary/Descriptor+Extensions.swift rename to Sources/SwiftProtobufPluginLibrary/Descriptor+Extensions.swift index 48a36e793..b9c6af643 100644 --- a/Sources/PluginLibrary/Descriptor+Extensions.swift +++ b/Sources/SwiftProtobufPluginLibrary/Descriptor+Extensions.swift @@ -1,4 +1,4 @@ -// Sources/PluginLibrary/Descriptor+Extensions.swift - Additions to Descriptor +// Sources/SwiftProtobufPluginLibrary/Descriptor+Extensions.swift - Additions to Descriptor // // Copyright (c) 2014 - 2017 Apple Inc. and the project authors // Licensed under Apache License v2.0 with Runtime Library Exception diff --git a/Sources/PluginLibrary/Descriptor.swift b/Sources/SwiftProtobufPluginLibrary/Descriptor.swift similarity index 99% rename from Sources/PluginLibrary/Descriptor.swift rename to Sources/SwiftProtobufPluginLibrary/Descriptor.swift index 0856933f8..c27dd6287 100644 --- a/Sources/PluginLibrary/Descriptor.swift +++ b/Sources/SwiftProtobufPluginLibrary/Descriptor.swift @@ -1,4 +1,4 @@ -// Sources/PluginLibrary/Descriptor.swift - Descriptor wrappers +// Sources/SwiftProtobufPluginLibrary/Descriptor.swift - Descriptor wrappers // // Copyright (c) 2014 - 2017 Apple Inc. and the project authors // Licensed under Apache License v2.0 with Runtime Library Exception diff --git a/Sources/PluginLibrary/FieldNumbers.swift b/Sources/SwiftProtobufPluginLibrary/FieldNumbers.swift similarity index 86% rename from Sources/PluginLibrary/FieldNumbers.swift rename to Sources/SwiftProtobufPluginLibrary/FieldNumbers.swift index 61a467719..3a7e5425b 100644 --- a/Sources/PluginLibrary/FieldNumbers.swift +++ b/Sources/SwiftProtobufPluginLibrary/FieldNumbers.swift @@ -1,4 +1,4 @@ -// Sources/PluginLibrary/FieldNumbers.swift - Proto Field numbers +// Sources/SwiftProtobufPluginLibrary/FieldNumbers.swift - Proto Field numbers // // Copyright (c) 2014 - 2017 Apple Inc. and the project authors // Licensed under Apache License v2.0 with Runtime Library Exception @@ -8,7 +8,7 @@ // // ----------------------------------------------------------------------------- /// -/// Field numbers needed by PluginLibrary since they currently aren't generated. +/// Field numbers needed by SwiftProtobufPluginLibrary since they currently aren't generated. /// // ----------------------------------------------------------------------------- diff --git a/Sources/PluginLibrary/Google_Protobuf_Compiler_CodeGeneratorResponse+Extensions.swift b/Sources/SwiftProtobufPluginLibrary/Google_Protobuf_Compiler_CodeGeneratorResponse+Extensions.swift similarity index 88% rename from Sources/PluginLibrary/Google_Protobuf_Compiler_CodeGeneratorResponse+Extensions.swift rename to Sources/SwiftProtobufPluginLibrary/Google_Protobuf_Compiler_CodeGeneratorResponse+Extensions.swift index 292d40f2b..dc691d381 100644 --- a/Sources/PluginLibrary/Google_Protobuf_Compiler_CodeGeneratorResponse+Extensions.swift +++ b/Sources/SwiftProtobufPluginLibrary/Google_Protobuf_Compiler_CodeGeneratorResponse+Extensions.swift @@ -1,4 +1,4 @@ -// Sources/PluginLibrary/Google_Protobuf_Compiler_CodeGeneratorResponse+Extensions.swift - CodeGeneratorResponse extensions +// Sources/SwiftProtobufPluginLibrary/Google_Protobuf_Compiler_CodeGeneratorResponse+Extensions.swift - CodeGeneratorResponse extensions // // Copyright (c) 2014 - 2017 Apple Inc. and the project authors // Licensed under Apache License v2.0 with Runtime Library Exception diff --git a/Sources/PluginLibrary/Google_Protobuf_SourceCodeInfo+Extensions.swift b/Sources/SwiftProtobufPluginLibrary/Google_Protobuf_SourceCodeInfo+Extensions.swift similarity index 95% rename from Sources/PluginLibrary/Google_Protobuf_SourceCodeInfo+Extensions.swift rename to Sources/SwiftProtobufPluginLibrary/Google_Protobuf_SourceCodeInfo+Extensions.swift index b58c9da3f..dc42c319a 100644 --- a/Sources/PluginLibrary/Google_Protobuf_SourceCodeInfo+Extensions.swift +++ b/Sources/SwiftProtobufPluginLibrary/Google_Protobuf_SourceCodeInfo+Extensions.swift @@ -1,4 +1,4 @@ -// Sources/PluginLibrary/Google_Protobuf_SourceCodeInfo+Extensions.swift - SourceCodeInfo Additions +// Sources/SwiftProtobufPluginLibrary/Google_Protobuf_SourceCodeInfo+Extensions.swift - SourceCodeInfo Additions // // Copyright (c) 2014 - 2017 Apple Inc. and the project authors // Licensed under Apache License v2.0 with Runtime Library Exception diff --git a/Sources/PluginLibrary/HashableArray.swift b/Sources/SwiftProtobufPluginLibrary/HashableArray.swift similarity index 89% rename from Sources/PluginLibrary/HashableArray.swift rename to Sources/SwiftProtobufPluginLibrary/HashableArray.swift index 6b85c298b..d49dd06c8 100644 --- a/Sources/PluginLibrary/HashableArray.swift +++ b/Sources/SwiftProtobufPluginLibrary/HashableArray.swift @@ -1,4 +1,4 @@ -// Sources/PluginLibrary/HashableArray.swift - Wrapper array to support hashing +// Sources/SwiftProtobufPluginLibrary/HashableArray.swift - Wrapper array to support hashing // // Copyright (c) 2014 - 2017 Apple Inc. and the project authors // Licensed under Apache License v2.0 with Runtime Library Exception diff --git a/Sources/PluginLibrary/NamingUtils.swift b/Sources/SwiftProtobufPluginLibrary/NamingUtils.swift similarity index 99% rename from Sources/PluginLibrary/NamingUtils.swift rename to Sources/SwiftProtobufPluginLibrary/NamingUtils.swift index fcba92f36..3d8809a80 100644 --- a/Sources/PluginLibrary/NamingUtils.swift +++ b/Sources/SwiftProtobufPluginLibrary/NamingUtils.swift @@ -1,4 +1,4 @@ -// Sources/PluginLibrary/NamingUtils.swift - Utilities for generating names +// Sources/SwiftProtobufPluginLibrary/NamingUtils.swift - Utilities for generating names // // Copyright (c) 2014 - 2017 Apple Inc. and the project authors // Licensed under Apache License v2.0 with Runtime Library Exception diff --git a/Sources/PluginLibrary/ProtoFileToModuleMappings.swift b/Sources/SwiftProtobufPluginLibrary/ProtoFileToModuleMappings.swift similarity index 98% rename from Sources/PluginLibrary/ProtoFileToModuleMappings.swift rename to Sources/SwiftProtobufPluginLibrary/ProtoFileToModuleMappings.swift index 52e03b826..bad71b8cb 100644 --- a/Sources/PluginLibrary/ProtoFileToModuleMappings.swift +++ b/Sources/SwiftProtobufPluginLibrary/ProtoFileToModuleMappings.swift @@ -1,4 +1,4 @@ -// Sources/PluginLibrary/ProtoPathModuleMappings.swift - Helpers for module mappings option +// Sources/SwiftProtobufPluginLibrary/ProtoPathModuleMappings.swift - Helpers for module mappings option // // Copyright (c) 2014 - 2017 Apple Inc. and the project authors // Licensed under Apache License v2.0 with Runtime Library Exception diff --git a/Sources/PluginLibrary/ProvidesLocationPath.swift b/Sources/SwiftProtobufPluginLibrary/ProvidesLocationPath.swift similarity index 84% rename from Sources/PluginLibrary/ProvidesLocationPath.swift rename to Sources/SwiftProtobufPluginLibrary/ProvidesLocationPath.swift index 55d9a0bcc..ff8fb7554 100644 --- a/Sources/PluginLibrary/ProvidesLocationPath.swift +++ b/Sources/SwiftProtobufPluginLibrary/ProvidesLocationPath.swift @@ -1,4 +1,4 @@ -// Sources/PluginLibrary/ProvidesLocationPath.swift - Proto Field numbers +// Sources/SwiftProtobufPluginLibrary/ProvidesLocationPath.swift - Proto Field numbers // // Copyright (c) 2014 - 2017 Apple Inc. and the project authors // Licensed under Apache License v2.0 with Runtime Library Exception diff --git a/Sources/PluginLibrary/ProvidesSourceCodeLocation.swift b/Sources/SwiftProtobufPluginLibrary/ProvidesSourceCodeLocation.swift similarity index 92% rename from Sources/PluginLibrary/ProvidesSourceCodeLocation.swift rename to Sources/SwiftProtobufPluginLibrary/ProvidesSourceCodeLocation.swift index 4689d2f14..dc585df74 100644 --- a/Sources/PluginLibrary/ProvidesSourceCodeLocation.swift +++ b/Sources/SwiftProtobufPluginLibrary/ProvidesSourceCodeLocation.swift @@ -1,4 +1,4 @@ -// Sources/PluginLibrary/ProvidesSourceCodeLocation.swift - SourceCodeInfo.Location provider +// Sources/SwiftProtobufPluginLibrary/ProvidesSourceCodeLocation.swift - SourceCodeInfo.Location provider // // Copyright (c) 2014 - 2017 Apple Inc. and the project authors // Licensed under Apache License v2.0 with Runtime Library Exception diff --git a/Sources/PluginLibrary/SwiftLanguage.swift b/Sources/SwiftProtobufPluginLibrary/SwiftLanguage.swift similarity index 98% rename from Sources/PluginLibrary/SwiftLanguage.swift rename to Sources/SwiftProtobufPluginLibrary/SwiftLanguage.swift index b0a947fde..9d7d7fa20 100644 --- a/Sources/PluginLibrary/SwiftLanguage.swift +++ b/Sources/SwiftProtobufPluginLibrary/SwiftLanguage.swift @@ -1,4 +1,4 @@ -// Sources/PluginLibrary/SwiftLanguage.swift - Swift language utilities +// Sources/SwiftProtobufPluginLibrary/SwiftLanguage.swift - Swift language utilities // // Copyright (c) 2014 - 2016 Apple Inc. and the project authors // Licensed under Apache License v2.0 with Runtime Library Exception diff --git a/Sources/PluginLibrary/SwiftProtobufInfo.swift b/Sources/SwiftProtobufPluginLibrary/SwiftProtobufInfo.swift similarity index 93% rename from Sources/PluginLibrary/SwiftProtobufInfo.swift rename to Sources/SwiftProtobufPluginLibrary/SwiftProtobufInfo.swift index 28573067d..3ab740e6b 100644 --- a/Sources/PluginLibrary/SwiftProtobufInfo.swift +++ b/Sources/SwiftProtobufPluginLibrary/SwiftProtobufInfo.swift @@ -1,4 +1,4 @@ -// Sources/PluginLibrary/LibraryInfo.swift - Helpers info about the SwiftProtobuf library +// Sources/SwiftProtobufPluginLibrary/LibraryInfo.swift - Helpers info about the SwiftProtobuf library // // Copyright (c) 2014 - 2017 Apple Inc. and the project authors // Licensed under Apache License v2.0 with Runtime Library Exception diff --git a/Sources/PluginLibrary/SwiftProtobufNamer.swift b/Sources/SwiftProtobufPluginLibrary/SwiftProtobufNamer.swift similarity index 99% rename from Sources/PluginLibrary/SwiftProtobufNamer.swift rename to Sources/SwiftProtobufPluginLibrary/SwiftProtobufNamer.swift index 4e10544c2..8441edec9 100644 --- a/Sources/PluginLibrary/SwiftProtobufNamer.swift +++ b/Sources/SwiftProtobufPluginLibrary/SwiftProtobufNamer.swift @@ -1,4 +1,4 @@ -// Sources/PluginLibrary/SwiftProtobufNamer.swift - A helper that generates SwiftProtobuf names. +// Sources/SwiftProtobufPluginLibrary/SwiftProtobufNamer.swift - A helper that generates SwiftProtobuf names. // // Copyright (c) 2014 - 2017 Apple Inc. and the project authors // Licensed under Apache License v2.0 with Runtime Library Exception diff --git a/Sources/PluginLibrary/UnicodeScalar+Extensions.swift b/Sources/SwiftProtobufPluginLibrary/UnicodeScalar+Extensions.swift similarity index 95% rename from Sources/PluginLibrary/UnicodeScalar+Extensions.swift rename to Sources/SwiftProtobufPluginLibrary/UnicodeScalar+Extensions.swift index 9f530aa9a..1e44f42eb 100644 --- a/Sources/PluginLibrary/UnicodeScalar+Extensions.swift +++ b/Sources/SwiftProtobufPluginLibrary/UnicodeScalar+Extensions.swift @@ -1,4 +1,4 @@ -// Sources/PluginLibrary/UnicodeScalar+Extensions.swift - Utilities for working with UnicodeScalars +// Sources/SwiftProtobufPluginLibrary/UnicodeScalar+Extensions.swift - Utilities for working with UnicodeScalars // // Copyright (c) 2014 - 2017 Apple Inc. and the project authors // Licensed under Apache License v2.0 with Runtime Library Exception diff --git a/Sources/PluginLibrary/descriptor.pb.swift b/Sources/SwiftProtobufPluginLibrary/descriptor.pb.swift similarity index 100% rename from Sources/PluginLibrary/descriptor.pb.swift rename to Sources/SwiftProtobufPluginLibrary/descriptor.pb.swift diff --git a/Sources/PluginLibrary/plugin.pb.swift b/Sources/SwiftProtobufPluginLibrary/plugin.pb.swift similarity index 100% rename from Sources/PluginLibrary/plugin.pb.swift rename to Sources/SwiftProtobufPluginLibrary/plugin.pb.swift diff --git a/Sources/PluginLibrary/swift_protobuf_module_mappings.pb.swift b/Sources/SwiftProtobufPluginLibrary/swift_protobuf_module_mappings.pb.swift similarity index 97% rename from Sources/PluginLibrary/swift_protobuf_module_mappings.pb.swift rename to Sources/SwiftProtobufPluginLibrary/swift_protobuf_module_mappings.pb.swift index 49c1b4ae4..5c2f123ef 100644 --- a/Sources/PluginLibrary/swift_protobuf_module_mappings.pb.swift +++ b/Sources/SwiftProtobufPluginLibrary/swift_protobuf_module_mappings.pb.swift @@ -1,12 +1,12 @@ // DO NOT EDIT. // // Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: PluginLibrary/swift_protobuf_module_mappings.proto +// Source: SwiftProtobufPluginLibrary/swift_protobuf_module_mappings.proto // // For information on using the generated types, please see the documenation: // https://github.com/apple/swift-protobuf/ -// Protos/PluginLibrary/swift_protobuf_module_mappings.proto - Swift Module mappings configuration +// Protos/SwiftProtobufPluginLibrary/swift_protobuf_module_mappings.proto - Swift Module mappings configuration // // This source file is part of the Swift.org open source project // diff --git a/Sources/protoc-gen-swift/Descriptor+Extensions.swift b/Sources/protoc-gen-swift/Descriptor+Extensions.swift index a1b9bfac8..1bf6da78b 100644 --- a/Sources/protoc-gen-swift/Descriptor+Extensions.swift +++ b/Sources/protoc-gen-swift/Descriptor+Extensions.swift @@ -8,7 +8,7 @@ // // ----------------------------------------------------------------------------- -import PluginLibrary +import SwiftProtobufPluginLibrary extension FileDescriptor { /// True if this file should perserve unknown enums within the enum. diff --git a/Sources/protoc-gen-swift/EnumGenerator.swift b/Sources/protoc-gen-swift/EnumGenerator.swift index f1aea75e0..c283ac75a 100644 --- a/Sources/protoc-gen-swift/EnumGenerator.swift +++ b/Sources/protoc-gen-swift/EnumGenerator.swift @@ -13,7 +13,7 @@ // ----------------------------------------------------------------------------- import Foundation -import PluginLibrary +import SwiftProtobufPluginLibrary import SwiftProtobuf /// The name of the case used to represent unrecognized values in proto3. diff --git a/Sources/protoc-gen-swift/ExtensionSetGenerator.swift b/Sources/protoc-gen-swift/ExtensionSetGenerator.swift index 6b30c12cb..df51d3b0b 100644 --- a/Sources/protoc-gen-swift/ExtensionSetGenerator.swift +++ b/Sources/protoc-gen-swift/ExtensionSetGenerator.swift @@ -15,7 +15,7 @@ /// // ----------------------------------------------------------------------------- import Foundation -import PluginLibrary +import SwiftProtobufPluginLibrary import SwiftProtobuf /// Provides the generation for proto2 syntax extensions in a file. diff --git a/Sources/protoc-gen-swift/FieldGenerator.swift b/Sources/protoc-gen-swift/FieldGenerator.swift index 94ae957c3..8b2177c2e 100644 --- a/Sources/protoc-gen-swift/FieldGenerator.swift +++ b/Sources/protoc-gen-swift/FieldGenerator.swift @@ -14,7 +14,7 @@ // ----------------------------------------------------------------------------- import Foundation -import PluginLibrary +import SwiftProtobufPluginLibrary import SwiftProtobuf diff --git a/Sources/protoc-gen-swift/FileGenerator.swift b/Sources/protoc-gen-swift/FileGenerator.swift index 1844585a7..5addd3ca6 100644 --- a/Sources/protoc-gen-swift/FileGenerator.swift +++ b/Sources/protoc-gen-swift/FileGenerator.swift @@ -15,7 +15,7 @@ /// // ----------------------------------------------------------------------------- import Foundation -import PluginLibrary +import SwiftProtobufPluginLibrary import SwiftProtobuf diff --git a/Sources/protoc-gen-swift/GeneratorOptions.swift b/Sources/protoc-gen-swift/GeneratorOptions.swift index 1edb1d9d9..57df34793 100644 --- a/Sources/protoc-gen-swift/GeneratorOptions.swift +++ b/Sources/protoc-gen-swift/GeneratorOptions.swift @@ -8,7 +8,7 @@ // // ----------------------------------------------------------------------------- -import PluginLibrary +import SwiftProtobufPluginLibrary class GeneratorOptions { enum OutputNaming : String { diff --git a/Sources/protoc-gen-swift/Google_Protobuf_DescriptorProto+Extensions.swift b/Sources/protoc-gen-swift/Google_Protobuf_DescriptorProto+Extensions.swift index 978eac31e..eeaaadb4f 100644 --- a/Sources/protoc-gen-swift/Google_Protobuf_DescriptorProto+Extensions.swift +++ b/Sources/protoc-gen-swift/Google_Protobuf_DescriptorProto+Extensions.swift @@ -14,7 +14,7 @@ // ----------------------------------------------------------------------------- import Foundation -import PluginLibrary +import SwiftProtobufPluginLibrary import SwiftProtobuf extension Google_Protobuf_DescriptorProto.ExtensionRange { diff --git a/Sources/protoc-gen-swift/Google_Protobuf_FileDescriptorProto+Extensions.swift b/Sources/protoc-gen-swift/Google_Protobuf_FileDescriptorProto+Extensions.swift index 73e02bc76..e3b43f0fc 100644 --- a/Sources/protoc-gen-swift/Google_Protobuf_FileDescriptorProto+Extensions.swift +++ b/Sources/protoc-gen-swift/Google_Protobuf_FileDescriptorProto+Extensions.swift @@ -13,7 +13,7 @@ /// // ----------------------------------------------------------------------------- -import PluginLibrary +import SwiftProtobufPluginLibrary import SwiftProtobuf extension Google_Protobuf_FileDescriptorProto { diff --git a/Sources/protoc-gen-swift/MessageFieldGenerator.swift b/Sources/protoc-gen-swift/MessageFieldGenerator.swift index e2a7e2606..01634ffbc 100644 --- a/Sources/protoc-gen-swift/MessageFieldGenerator.swift +++ b/Sources/protoc-gen-swift/MessageFieldGenerator.swift @@ -13,7 +13,7 @@ /// // ----------------------------------------------------------------------------- import Foundation -import PluginLibrary +import SwiftProtobufPluginLibrary import SwiftProtobuf diff --git a/Sources/protoc-gen-swift/MessageGenerator.swift b/Sources/protoc-gen-swift/MessageGenerator.swift index b528d6a9a..9a11654bc 100644 --- a/Sources/protoc-gen-swift/MessageGenerator.swift +++ b/Sources/protoc-gen-swift/MessageGenerator.swift @@ -15,7 +15,7 @@ // ----------------------------------------------------------------------------- import Foundation -import PluginLibrary +import SwiftProtobufPluginLibrary import SwiftProtobuf class MessageGenerator { diff --git a/Sources/protoc-gen-swift/MessageStorageClassGenerator.swift b/Sources/protoc-gen-swift/MessageStorageClassGenerator.swift index 546964273..0aea5590b 100644 --- a/Sources/protoc-gen-swift/MessageStorageClassGenerator.swift +++ b/Sources/protoc-gen-swift/MessageStorageClassGenerator.swift @@ -14,7 +14,7 @@ // ----------------------------------------------------------------------------- import Foundation -import PluginLibrary +import SwiftProtobufPluginLibrary import SwiftProtobuf /// Generates the `_StorageClass` used for messages that employ copy-on-write diff --git a/Sources/protoc-gen-swift/OneofGenerator.swift b/Sources/protoc-gen-swift/OneofGenerator.swift index 3ed7694fe..4c1bde57f 100644 --- a/Sources/protoc-gen-swift/OneofGenerator.swift +++ b/Sources/protoc-gen-swift/OneofGenerator.swift @@ -13,7 +13,7 @@ /// // ----------------------------------------------------------------------------- import Foundation -import PluginLibrary +import SwiftProtobufPluginLibrary import SwiftProtobuf class OneofGenerator { diff --git a/Sources/protoc-gen-swift/main.swift b/Sources/protoc-gen-swift/main.swift index b12cd78c4..41c3a477d 100644 --- a/Sources/protoc-gen-swift/main.swift +++ b/Sources/protoc-gen-swift/main.swift @@ -21,7 +21,7 @@ import Foundation import SwiftProtobuf -import PluginLibrary +import SwiftProtobufPluginLibrary extension Google_Protobuf_Compiler_Version { fileprivate var versionString: String { diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift index 1e2ed5d9f..8cfaf9af7 100644 --- a/Tests/LinuxMain.swift +++ b/Tests/LinuxMain.swift @@ -5,7 +5,7 @@ import XCTest @testable import SwiftProtobufTests -@testable import PluginLibraryTests +@testable import SwiftProtobufPluginLibraryTests extension Test_Descriptor { diff --git a/Tests/PluginLibraryTests/Descriptor+TestHelpers.swift b/Tests/SwiftProtobufPluginLibraryTests/Descriptor+TestHelpers.swift similarity index 97% rename from Tests/PluginLibraryTests/Descriptor+TestHelpers.swift rename to Tests/SwiftProtobufPluginLibraryTests/Descriptor+TestHelpers.swift index 9e7b13729..4580a58f0 100644 --- a/Tests/PluginLibraryTests/Descriptor+TestHelpers.swift +++ b/Tests/SwiftProtobufPluginLibraryTests/Descriptor+TestHelpers.swift @@ -8,7 +8,7 @@ // // ----------------------------------------------------------------------------- -import PluginLibrary +import SwiftProtobufPluginLibrary extension Google_Protobuf_FileDescriptorProto { init(name: String, dependencies: [String] = [], publicDependencies: [Int32] = []) { diff --git a/Tests/PluginLibraryTests/DescriptorTestData.swift b/Tests/SwiftProtobufPluginLibraryTests/DescriptorTestData.swift similarity index 97% rename from Tests/PluginLibraryTests/DescriptorTestData.swift rename to Tests/SwiftProtobufPluginLibraryTests/DescriptorTestData.swift index 01cc5b05f..8f3421488 100644 --- a/Tests/PluginLibraryTests/DescriptorTestData.swift +++ b/Tests/SwiftProtobufPluginLibraryTests/DescriptorTestData.swift @@ -812,28 +812,29 @@ let fileDesciptorSetBytes: [UInt8] = [ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x90, 0xbf, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x78, 0x74, 0x53, 0x74, 0x72, - 0x42, 0x06, 0xba, 0x02, 0x03, 0x53, 0x44, 0x54, 0x0a, 0x85, 0x02, 0x0a, - 0x32, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4c, 0x69, 0x62, 0x72, 0x61, - 0x72, 0x79, 0x2f, 0x73, 0x77, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x73, 0x77, 0x69, 0x66, 0x74, 0x5f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x67, 0x65, 0x6e, 0x5f, - 0x73, 0x77, 0x69, 0x66, 0x74, 0x22, 0xac, 0x01, 0x0a, 0x0e, 0x4d, 0x6f, + 0x42, 0x06, 0xba, 0x02, 0x03, 0x53, 0x44, 0x54, 0x0a, 0x92, 0x02, 0x0a, + 0x3f, 0x53, 0x77, 0x69, 0x66, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4c, 0x69, 0x62, 0x72, + 0x61, 0x72, 0x79, 0x2f, 0x73, 0x77, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x73, 0x77, 0x69, 0x66, 0x74, 0x5f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x67, 0x65, 0x6e, + 0x5f, 0x73, 0x77, 0x69, 0x66, 0x74, 0x22, 0xac, 0x01, 0x0a, 0x0e, 0x4d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, + 0x73, 0x12, 0x48, 0x0a, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x73, 0x77, 0x69, + 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x67, 0x65, 0x6e, 0x5f, 0x73, 0x77, 0x69, 0x66, 0x74, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, - 0x12, 0x48, 0x0a, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x73, 0x77, 0x69, 0x66, - 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x67, - 0x65, 0x6e, 0x5f, 0x73, 0x77, 0x69, 0x66, 0x74, 0x2e, 0x4d, 0x6f, 0x64, - 0x75, 0x6c, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x2e, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x1a, 0x50, 0x0a, 0x05, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x1f, 0x0a, 0x0b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x6f, - 0x64, 0x75, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, - 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33 + 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x6d, 0x61, 0x70, 0x70, + 0x69, 0x6e, 0x67, 0x1a, 0x50, 0x0a, 0x05, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, + 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, + 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, + 0x68, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33 ] let fileDesciptorSetData = Data(bytes: fileDesciptorSetBytes) diff --git a/Tests/PluginLibraryTests/Test_Descriptor.swift b/Tests/SwiftProtobufPluginLibraryTests/Test_Descriptor.swift similarity index 97% rename from Tests/PluginLibraryTests/Test_Descriptor.swift rename to Tests/SwiftProtobufPluginLibraryTests/Test_Descriptor.swift index 4faf0532e..2736aacd8 100644 --- a/Tests/PluginLibraryTests/Test_Descriptor.swift +++ b/Tests/SwiftProtobufPluginLibraryTests/Test_Descriptor.swift @@ -1,4 +1,4 @@ -// Tests/PluginLibraryTests/Test_Descriptor.swift - Test Descriptor.swift +// Tests/SwiftProtobufPluginLibraryTests/Test_Descriptor.swift - Test Descriptor.swift // // Copyright (c) 2014 - 2017 Apple Inc. and the project authors // Licensed under Apache License v2.0 with Runtime Library Exception @@ -9,7 +9,7 @@ // ----------------------------------------------------------------------------- import XCTest -import PluginLibrary +import SwiftProtobufPluginLibrary class Test_Descriptor: XCTestCase { @@ -23,7 +23,7 @@ class Test_Descriptor: XCTestCase { XCTAssertEqual(descriptorSet.files[0].name, "google/protobuf/descriptor.proto") XCTAssertEqual(descriptorSet.files[1].name, "google/protobuf/compiler/plugin.proto") XCTAssertEqual(descriptorSet.files[2].name, "pluginlib_descriptor_test.proto") - XCTAssertEqual(descriptorSet.files[3].name, "PluginLibrary/swift_protobuf_module_mappings.proto") + XCTAssertEqual(descriptorSet.files[3].name, "SwiftProtobufPluginLibrary/swift_protobuf_module_mappings.proto") let pluginFileDescriptor = descriptorSet.files[1] diff --git a/Tests/PluginLibraryTests/Test_NamingUtils.swift b/Tests/SwiftProtobufPluginLibraryTests/Test_NamingUtils.swift similarity index 98% rename from Tests/PluginLibraryTests/Test_NamingUtils.swift rename to Tests/SwiftProtobufPluginLibraryTests/Test_NamingUtils.swift index 3ae7afed5..1d43a492f 100644 --- a/Tests/PluginLibraryTests/Test_NamingUtils.swift +++ b/Tests/SwiftProtobufPluginLibraryTests/Test_NamingUtils.swift @@ -1,4 +1,4 @@ -// Tests/PluginLibraryTests/Test_NamingUtils.swift - Test NamingUtils.swift +// Tests/SwiftProtobufPluginLibraryTests/Test_NamingUtils.swift - Test NamingUtils.swift // // Copyright (c) 2014 - 2017 Apple Inc. and the project authors // Licensed under Apache License v2.0 with Runtime Library Exception @@ -9,7 +9,7 @@ // ----------------------------------------------------------------------------- import XCTest -@testable import PluginLibrary +@testable import SwiftProtobufPluginLibrary class Test_NamingUtils: XCTestCase { diff --git a/Tests/PluginLibraryTests/Test_ProtoFileToModuleMappings.swift b/Tests/SwiftProtobufPluginLibraryTests/Test_ProtoFileToModuleMappings.swift similarity index 98% rename from Tests/PluginLibraryTests/Test_ProtoFileToModuleMappings.swift rename to Tests/SwiftProtobufPluginLibraryTests/Test_ProtoFileToModuleMappings.swift index ae219f575..a18856823 100644 --- a/Tests/PluginLibraryTests/Test_ProtoFileToModuleMappings.swift +++ b/Tests/SwiftProtobufPluginLibraryTests/Test_ProtoFileToModuleMappings.swift @@ -1,4 +1,4 @@ -// Tests/PluginLibraryTests/Test_ProtoFileToModuleMappings.swift - Test ProtoFile to Modules helper +// Tests/SwiftProtobufPluginLibraryTests/Test_ProtoFileToModuleMappings.swift - Test ProtoFile to Modules helper // // Copyright (c) 2014 - 2017 Apple Inc. and the project authors // Licensed under Apache License v2.0 with Runtime Library Exception @@ -9,7 +9,7 @@ // ----------------------------------------------------------------------------- import XCTest -@testable import PluginLibrary +@testable import SwiftProtobufPluginLibrary // Support equality to simplify testing of getting the correct errors. extension ProtoFileToModuleMappings.LoadError: Equatable { diff --git a/Tests/PluginLibraryTests/Test_SwiftLanguage.swift b/Tests/SwiftProtobufPluginLibraryTests/Test_SwiftLanguage.swift similarity index 88% rename from Tests/PluginLibraryTests/Test_SwiftLanguage.swift rename to Tests/SwiftProtobufPluginLibraryTests/Test_SwiftLanguage.swift index 34ce6b2bd..3a8dd0ab7 100644 --- a/Tests/PluginLibraryTests/Test_SwiftLanguage.swift +++ b/Tests/SwiftProtobufPluginLibraryTests/Test_SwiftLanguage.swift @@ -1,4 +1,4 @@ -// Tests/PluginLibraryTests/Test_SwiftLanguage.swift - Test language utilities +// Tests/SwiftProtobufPluginLibraryTests/Test_SwiftLanguage.swift - Test language utilities // // Copyright (c) 2014 - 2016 Apple Inc. and the project authors // Licensed under Apache License v2.0 with Runtime Library Exception @@ -13,7 +13,7 @@ // ----------------------------------------------------------------------------- import XCTest -import PluginLibrary +import SwiftProtobufPluginLibrary class Test_SwiftLanguage: XCTestCase { func testIsValidSwiftIdentifier() { diff --git a/Tests/PluginLibraryTests/Test_SwiftProtobufNamer.swift b/Tests/SwiftProtobufPluginLibraryTests/Test_SwiftProtobufNamer.swift similarity index 98% rename from Tests/PluginLibraryTests/Test_SwiftProtobufNamer.swift rename to Tests/SwiftProtobufPluginLibraryTests/Test_SwiftProtobufNamer.swift index dda9b997d..2dde346ff 100644 --- a/Tests/PluginLibraryTests/Test_SwiftProtobufNamer.swift +++ b/Tests/SwiftProtobufPluginLibraryTests/Test_SwiftProtobufNamer.swift @@ -1,4 +1,4 @@ -// Tests/PluginLibraryTests/Test_SwiftProtobufNamer.swift - Test SwiftProtobufNamer.swift +// Tests/SwiftProtobufPluginLibraryTests/Test_SwiftProtobufNamer.swift - Test SwiftProtobufNamer.swift // // Copyright (c) 2014 - 2017 Apple Inc. and the project authors // Licensed under Apache License v2.0 with Runtime Library Exception @@ -9,7 +9,7 @@ // ----------------------------------------------------------------------------- import XCTest -import PluginLibrary +import SwiftProtobufPluginLibrary class Test_SwiftProtobufNamer: XCTestCase {