From e2acc459e0ba5c042ec634311595501221c4c4db Mon Sep 17 00:00:00 2001 From: Derek Leung Date: Fri, 3 May 2024 20:27:01 +0100 Subject: [PATCH 1/2] Add SMTP as example with 2 experimental features --- examples/smtp_example/.bazelrc | 8 + examples/smtp_example/BUILD.bazel | 45 + examples/smtp_example/MODULE.bazel | 47 + examples/smtp_example/Package.resolved | 203 +++ examples/smtp_example/Package.swift | 10 + examples/smtp_example/README.md | 1 + examples/smtp_example/WORKSPACE | 1 + examples/smtp_example/WORKSPACE.bzlmod | 1 + examples/smtp_example/do_test | 13 + examples/smtp_example/main.swift | 4 + examples/smtp_example/swift_deps_index.json | 1499 +++++++++++++++++++ 11 files changed, 1832 insertions(+) create mode 100644 examples/smtp_example/.bazelrc create mode 100644 examples/smtp_example/BUILD.bazel create mode 100644 examples/smtp_example/MODULE.bazel create mode 100644 examples/smtp_example/Package.resolved create mode 100644 examples/smtp_example/Package.swift create mode 100644 examples/smtp_example/README.md create mode 100644 examples/smtp_example/WORKSPACE create mode 100644 examples/smtp_example/WORKSPACE.bzlmod create mode 100755 examples/smtp_example/do_test create mode 100644 examples/smtp_example/main.swift create mode 100644 examples/smtp_example/swift_deps_index.json diff --git a/examples/smtp_example/.bazelrc b/examples/smtp_example/.bazelrc new file mode 100644 index 000000000..e9769fc7b --- /dev/null +++ b/examples/smtp_example/.bazelrc @@ -0,0 +1,8 @@ +# Import Shared settings +import %workspace%/../../shared.bazelrc + +# Import CI settings. +import %workspace%/../../ci.bazelrc + +# Try to import a local.rc file; typically, written by CI +try-import %workspace%/../../local.bazelrc diff --git a/examples/smtp_example/BUILD.bazel b/examples/smtp_example/BUILD.bazel new file mode 100644 index 000000000..23d2d7b16 --- /dev/null +++ b/examples/smtp_example/BUILD.bazel @@ -0,0 +1,45 @@ +load("@bazel_gazelle//:def.bzl", "gazelle", "gazelle_binary") +load("@build_bazel_rules_swift//swift:swift.bzl", "swift_binary") +load("@cgrindel_bazel_starlib//bzltidy:defs.bzl", "tidy") +load("@rules_swift_package_manager//swiftpkg:defs.bzl", "swift_update_packages") + +tidy( + name = "tidy", + targets = [ + ":swift_update_pkgs", + ":update_build_files", + ], +) + +# MARK: - Gazelle + +# Ignore the Swift build folder +# gazelle:exclude .build + +gazelle_binary( + name = "gazelle_bin", + languages = [ + "@bazel_skylib_gazelle_plugin//bzl", + "@rules_swift_package_manager//gazelle", + ], +) + +gazelle( + name = "update_build_files", + gazelle = ":gazelle_bin", +) + +swift_update_packages( + name = "swift_update_pkgs", + gazelle = ":gazelle_bin", + generate_swift_deps_for_workspace = False, + update_bzlmod_stanzas = True, +) + +swift_binary( + name = "smtp_example", + srcs = ["main.swift"], + module_name = "smtp_example", + visibility = ["//visibility:public"], + deps = ["@swiftpkg_swift_smtp//:SwiftSMTP"], +) diff --git a/examples/smtp_example/MODULE.bazel b/examples/smtp_example/MODULE.bazel new file mode 100644 index 000000000..165fb3dc6 --- /dev/null +++ b/examples/smtp_example/MODULE.bazel @@ -0,0 +1,47 @@ +bazel_dep( + name = "rules_swift_package_manager", + version = "0.0.0", +) +local_path_override( + module_name = "rules_swift_package_manager", + path = "../..", +) + +bazel_dep(name = "cgrindel_bazel_starlib", version = "0.20.2") +bazel_dep(name = "bazel_skylib", version = "1.6.0") +bazel_dep(name = "apple_support", version = "1.9.0", repo_name = "build_bazel_apple_support") +bazel_dep( + name = "rules_swift", + version = "1.18.0", + repo_name = "build_bazel_rules_swift", +) +bazel_dep( + name = "rules_apple", + version = "3.5.1", + repo_name = "build_bazel_rules_apple", +) + +bazel_dep( + name = "bazel_skylib_gazelle_plugin", + version = "1.6.0", + dev_dependency = True, +) +bazel_dep( + name = "gazelle", + version = "0.36.0", + dev_dependency = True, + repo_name = "bazel_gazelle", +) +# swift_deps START +swift_deps = use_extension( + "@rules_swift_package_manager//:extensions.bzl", + "swift_deps", +) +swift_deps.from_file( + deps_index = "//:swift_deps_index.json", +) +use_repo( + swift_deps, + "swiftpkg_swift_smtp", +) +# swift_deps END diff --git a/examples/smtp_example/Package.resolved b/examples/smtp_example/Package.resolved new file mode 100644 index 000000000..132cf53ad --- /dev/null +++ b/examples/smtp_example/Package.resolved @@ -0,0 +1,203 @@ +{ + "pins" : [ + { + "identity" : "async-http-client", + "kind" : "remoteSourceControl", + "location" : "https://github.com/swift-server/async-http-client.git", + "state" : { + "revision" : "fb308ee72f3d4c082a507033f94afa7395963ef3", + "version" : "1.21.0" + } + }, + { + "identity" : "async-kit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/vapor/async-kit.git", + "state" : { + "revision" : "7ece208cd401687641c88367a00e3ea2b04311f1", + "version" : "1.19.0" + } + }, + { + "identity" : "console-kit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/vapor/console-kit.git", + "state" : { + "revision" : "a31f44ebfbd15a2cc0fda705279676773ac16355", + "version" : "4.14.1" + } + }, + { + "identity" : "multipart-kit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/vapor/multipart-kit.git", + "state" : { + "revision" : "12ee56f25bd3fc4c2d09c2aa16e69de61dc786e8", + "version" : "4.6.0" + } + }, + { + "identity" : "routing-kit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/vapor/routing-kit.git", + "state" : { + "revision" : "2a92a7eac411a82fb3a03731be5e76773ebe1b3e", + "version" : "4.9.0" + } + }, + { + "identity" : "swift-algorithms", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-algorithms.git", + "state" : { + "revision" : "f6919dfc309e7f1b56224378b11e28bab5bccc42", + "version" : "1.2.0" + } + }, + { + "identity" : "swift-atomics", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-atomics.git", + "state" : { + "revision" : "cd142fd2f64be2100422d658e7411e39489da985", + "version" : "1.2.0" + } + }, + { + "identity" : "swift-collections", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-collections.git", + "state" : { + "revision" : "94cf62b3ba8d4bed62680a282d4c25f9c63c2efb", + "version" : "1.1.0" + } + }, + { + "identity" : "swift-crypto", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-crypto.git", + "state" : { + "revision" : "f0525da24dc3c6cbb2b6b338b65042bc91cbc4bb", + "version" : "3.3.0" + } + }, + { + "identity" : "swift-http-types", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-http-types", + "state" : { + "revision" : "12358d55a3824bd5fed310b999ea8cf83a9a1a65", + "version" : "1.0.3" + } + }, + { + "identity" : "swift-log", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-log.git", + "state" : { + "revision" : "e97a6fcb1ab07462881ac165fdbb37f067e205d5", + "version" : "1.5.4" + } + }, + { + "identity" : "swift-metrics", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-metrics.git", + "state" : { + "revision" : "971ba26378ab69c43737ee7ba967a896cb74c0d1", + "version" : "2.4.1" + } + }, + { + "identity" : "swift-nio", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-nio", + "state" : { + "revision" : "359c461e5561d22c6334828806cc25d759ca7aa6", + "version" : "2.65.0" + } + }, + { + "identity" : "swift-nio-extras", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-nio-extras", + "state" : { + "revision" : "a3b640d7dc567225db7c94386a6e71aded1bfa63", + "version" : "1.22.0" + } + }, + { + "identity" : "swift-nio-http2", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-nio-http2.git", + "state" : { + "revision" : "c6afe04165c865faaa687b42c32ed76dfcc91076", + "version" : "1.31.0" + } + }, + { + "identity" : "swift-nio-ssl", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-nio-ssl", + "state" : { + "revision" : "7c381eb6083542b124a6c18fae742f55001dc2b5", + "version" : "2.26.0" + } + }, + { + "identity" : "swift-nio-transport-services", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-nio-transport-services.git", + "state" : { + "revision" : "6cbe0ed2b394f21ab0d46b9f0c50c6be964968ce", + "version" : "1.20.1" + } + }, + { + "identity" : "swift-numerics", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-numerics.git", + "state" : { + "revision" : "0a5bc04095a675662cf24757cc0640aa2204253b", + "version" : "1.0.2" + } + }, + { + "identity" : "swift-smtp", + "kind" : "remoteSourceControl", + "location" : "https://github.com/sersoft-gmbh/swift-smtp", + "state" : { + "revision" : "46e9ef4c2a2808011aaf0ed62f9968da2b757a2d", + "version" : "2.10.0" + } + }, + { + "identity" : "swift-system", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-system.git", + "state" : { + "revision" : "025bcb1165deab2e20d4eaba79967ce73013f496", + "version" : "1.2.1" + } + }, + { + "identity" : "vapor", + "kind" : "remoteSourceControl", + "location" : "https://github.com/vapor/vapor", + "state" : { + "revision" : "e5cb0abdadff95ef996fafd6268f2f5f8cba6325", + "version" : "4.94.1" + } + }, + { + "identity" : "websocket-kit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/vapor/websocket-kit.git", + "state" : { + "revision" : "4232d34efa49f633ba61afde365d3896fc7f8740", + "version" : "2.15.0" + } + } + ], + "version" : 2 +} diff --git a/examples/smtp_example/Package.swift b/examples/smtp_example/Package.swift new file mode 100644 index 000000000..5b56a3091 --- /dev/null +++ b/examples/smtp_example/Package.swift @@ -0,0 +1,10 @@ +// swift-tools-version: 5.7 + +import PackageDescription + +let package = Package( + name: "smtp_example", + dependencies: [ + .package(url: "https://github.com/sersoft-gmbh/swift-smtp", from: "2.10.0"), + ] +) diff --git a/examples/smtp_example/README.md b/examples/smtp_example/README.md new file mode 100644 index 000000000..ebf1ffcbf --- /dev/null +++ b/examples/smtp_example/README.md @@ -0,0 +1 @@ +# smtp Example diff --git a/examples/smtp_example/WORKSPACE b/examples/smtp_example/WORKSPACE new file mode 100644 index 000000000..d251ab7ba --- /dev/null +++ b/examples/smtp_example/WORKSPACE @@ -0,0 +1 @@ +# Intentionally blank: Using bzlmod diff --git a/examples/smtp_example/WORKSPACE.bzlmod b/examples/smtp_example/WORKSPACE.bzlmod new file mode 100644 index 000000000..af8a0e896 --- /dev/null +++ b/examples/smtp_example/WORKSPACE.bzlmod @@ -0,0 +1 @@ +# Intentionally blank: Force bzlmod to strict mode diff --git a/examples/smtp_example/do_test b/examples/smtp_example/do_test new file mode 100755 index 000000000..bf114c0d8 --- /dev/null +++ b/examples/smtp_example/do_test @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +set -o errexit -o nounset -o pipefail + +# Use the Bazel binary specified by the integration test. Otherise, fall back +# to bazel. +bazel="${BIT_BAZEL_BINARY:-bazel}" + +# Generate Swift external deps and update build files +"${bazel}" run //:tidy + +# Ensure that it builds and tests pass +"${bazel}" test //... diff --git a/examples/smtp_example/main.swift b/examples/smtp_example/main.swift new file mode 100644 index 000000000..a9e956759 --- /dev/null +++ b/examples/smtp_example/main.swift @@ -0,0 +1,4 @@ +import SwiftSMTP + +let configuration = Configuration.fromEnvironment() +print(configuration.server.hostname) diff --git a/examples/smtp_example/swift_deps_index.json b/examples/smtp_example/swift_deps_index.json new file mode 100644 index 000000000..9b8f5d0fc --- /dev/null +++ b/examples/smtp_example/swift_deps_index.json @@ -0,0 +1,1499 @@ +{ + "direct_dep_identities": [ + "swift-smtp" + ], + "modules": [ + { + "name": "AsyncHTTPClient", + "c99name": "AsyncHTTPClient", + "src_type": "swift", + "label": "@swiftpkg_async_http_client//:AsyncHTTPClient.rspm", + "package_identity": "async-http-client", + "product_memberships": [ + "AsyncHTTPClient" + ] + }, + { + "name": "CAsyncHTTPClient", + "c99name": "CAsyncHTTPClient", + "src_type": "clang", + "label": "@swiftpkg_async_http_client//:CAsyncHTTPClient.rspm", + "package_identity": "async-http-client", + "product_memberships": [ + "AsyncHTTPClient" + ] + }, + { + "name": "AsyncKit", + "c99name": "AsyncKit", + "src_type": "swift", + "label": "@swiftpkg_async_kit//:AsyncKit.rspm", + "package_identity": "async-kit", + "product_memberships": [ + "AsyncKit" + ] + }, + { + "name": "ConsoleKit", + "c99name": "ConsoleKit", + "src_type": "swift", + "label": "@swiftpkg_console_kit//:ConsoleKit.rspm", + "package_identity": "console-kit", + "product_memberships": [ + "ConsoleKit" + ] + }, + { + "name": "ConsoleKitCommands", + "c99name": "ConsoleKitCommands", + "src_type": "swift", + "label": "@swiftpkg_console_kit//:ConsoleKitCommands.rspm", + "package_identity": "console-kit", + "product_memberships": [ + "ConsoleKit", + "ConsoleKitCommands" + ] + }, + { + "name": "ConsoleKitTerminal", + "c99name": "ConsoleKitTerminal", + "src_type": "swift", + "label": "@swiftpkg_console_kit//:ConsoleKitTerminal.rspm", + "package_identity": "console-kit", + "product_memberships": [ + "ConsoleKit", + "ConsoleKitTerminal", + "ConsoleKitCommands" + ] + }, + { + "name": "MultipartKit", + "c99name": "MultipartKit", + "src_type": "swift", + "label": "@swiftpkg_multipart_kit//:MultipartKit.rspm", + "package_identity": "multipart-kit", + "product_memberships": [ + "MultipartKit" + ] + }, + { + "name": "RoutingKit", + "c99name": "RoutingKit", + "src_type": "swift", + "label": "@swiftpkg_routing_kit//:RoutingKit.rspm", + "package_identity": "routing-kit", + "product_memberships": [ + "RoutingKit" + ] + }, + { + "name": "Algorithms", + "c99name": "Algorithms", + "src_type": "swift", + "label": "@swiftpkg_swift_algorithms//:Algorithms.rspm", + "package_identity": "swift-algorithms", + "product_memberships": [ + "Algorithms" + ] + }, + { + "name": "Atomics", + "c99name": "Atomics", + "src_type": "swift", + "label": "@swiftpkg_swift_atomics//:Atomics.rspm", + "package_identity": "swift-atomics", + "product_memberships": [ + "Atomics" + ] + }, + { + "name": "_AtomicsShims", + "c99name": "_AtomicsShims", + "src_type": "clang", + "label": "@swiftpkg_swift_atomics//:_AtomicsShims.rspm", + "package_identity": "swift-atomics", + "product_memberships": [ + "Atomics" + ] + }, + { + "name": "BitCollections", + "c99name": "BitCollections", + "src_type": "swift", + "label": "@swiftpkg_swift_collections//:BitCollections.rspm", + "package_identity": "swift-collections", + "product_memberships": [ + "BitCollections", + "Collections" + ] + }, + { + "name": "Collections", + "c99name": "Collections", + "src_type": "swift", + "label": "@swiftpkg_swift_collections//:Collections.rspm", + "package_identity": "swift-collections", + "product_memberships": [ + "Collections" + ] + }, + { + "name": "DequeModule", + "c99name": "DequeModule", + "src_type": "swift", + "label": "@swiftpkg_swift_collections//:DequeModule.rspm", + "package_identity": "swift-collections", + "product_memberships": [ + "DequeModule", + "Collections" + ] + }, + { + "name": "HashTreeCollections", + "c99name": "HashTreeCollections", + "src_type": "swift", + "label": "@swiftpkg_swift_collections//:HashTreeCollections.rspm", + "package_identity": "swift-collections", + "product_memberships": [ + "HashTreeCollections", + "Collections" + ] + }, + { + "name": "HeapModule", + "c99name": "HeapModule", + "src_type": "swift", + "label": "@swiftpkg_swift_collections//:HeapModule.rspm", + "package_identity": "swift-collections", + "product_memberships": [ + "HeapModule", + "Collections" + ] + }, + { + "name": "OrderedCollections", + "c99name": "OrderedCollections", + "src_type": "swift", + "label": "@swiftpkg_swift_collections//:OrderedCollections.rspm", + "package_identity": "swift-collections", + "product_memberships": [ + "OrderedCollections", + "Collections" + ] + }, + { + "name": "_CollectionsUtilities", + "c99name": "_CollectionsUtilities", + "src_type": "swift", + "label": "@swiftpkg_swift_collections//:_CollectionsUtilities.rspm", + "package_identity": "swift-collections", + "product_memberships": [ + "BitCollections", + "DequeModule", + "HashTreeCollections", + "HeapModule", + "OrderedCollections", + "_RopeModule", + "Collections" + ] + }, + { + "name": "_RopeModule", + "c99name": "_RopeModule", + "src_type": "swift", + "label": "@swiftpkg_swift_collections//:_RopeModule.rspm", + "package_identity": "swift-collections", + "product_memberships": [ + "_RopeModule", + "Collections" + ] + }, + { + "name": "CCryptoBoringSSL", + "c99name": "CCryptoBoringSSL", + "src_type": "clang", + "label": "@swiftpkg_swift_crypto//:CCryptoBoringSSL.rspm", + "package_identity": "swift-crypto", + "product_memberships": [ + "Crypto", + "_CryptoExtras" + ] + }, + { + "name": "CCryptoBoringSSLShims", + "c99name": "CCryptoBoringSSLShims", + "src_type": "clang", + "label": "@swiftpkg_swift_crypto//:CCryptoBoringSSLShims.rspm", + "package_identity": "swift-crypto", + "product_memberships": [ + "Crypto", + "_CryptoExtras" + ] + }, + { + "name": "Crypto", + "c99name": "Crypto", + "src_type": "swift", + "label": "@swiftpkg_swift_crypto//:Crypto.rspm", + "package_identity": "swift-crypto", + "product_memberships": [ + "Crypto", + "_CryptoExtras" + ] + }, + { + "name": "CryptoBoringWrapper", + "c99name": "CryptoBoringWrapper", + "src_type": "swift", + "label": "@swiftpkg_swift_crypto//:CryptoBoringWrapper.rspm", + "package_identity": "swift-crypto", + "product_memberships": [ + "Crypto", + "_CryptoExtras" + ] + }, + { + "name": "_CryptoExtras", + "c99name": "_CryptoExtras", + "src_type": "swift", + "label": "@swiftpkg_swift_crypto//:_CryptoExtras.rspm", + "package_identity": "swift-crypto", + "product_memberships": [ + "_CryptoExtras" + ] + }, + { + "name": "HTTPTypes", + "c99name": "HTTPTypes", + "src_type": "swift", + "label": "@swiftpkg_swift_http_types//:HTTPTypes.rspm", + "package_identity": "swift-http-types", + "product_memberships": [ + "HTTPTypes", + "HTTPTypesFoundation" + ] + }, + { + "name": "HTTPTypesFoundation", + "c99name": "HTTPTypesFoundation", + "src_type": "swift", + "label": "@swiftpkg_swift_http_types//:HTTPTypesFoundation.rspm", + "package_identity": "swift-http-types", + "product_memberships": [ + "HTTPTypesFoundation" + ] + }, + { + "name": "Logging", + "c99name": "Logging", + "src_type": "swift", + "label": "@swiftpkg_swift_log//:Logging.rspm", + "package_identity": "swift-log", + "product_memberships": [ + "Logging" + ] + }, + { + "name": "CoreMetrics", + "c99name": "CoreMetrics", + "src_type": "swift", + "label": "@swiftpkg_swift_metrics//:CoreMetrics.rspm", + "package_identity": "swift-metrics", + "product_memberships": [ + "CoreMetrics", + "Metrics", + "MetricsTestKit" + ] + }, + { + "name": "Metrics", + "c99name": "Metrics", + "src_type": "swift", + "label": "@swiftpkg_swift_metrics//:Metrics.rspm", + "package_identity": "swift-metrics", + "product_memberships": [ + "Metrics", + "MetricsTestKit" + ] + }, + { + "name": "MetricsTestKit", + "c99name": "MetricsTestKit", + "src_type": "swift", + "label": "@swiftpkg_swift_metrics//:MetricsTestKit.rspm", + "package_identity": "swift-metrics", + "product_memberships": [ + "MetricsTestKit" + ] + }, + { + "name": "CNIOAtomics", + "c99name": "CNIOAtomics", + "src_type": "clang", + "label": "@swiftpkg_swift_nio//:CNIOAtomics.rspm", + "package_identity": "swift-nio", + "product_memberships": [ + "NIOCore", + "NIO", + "NIOEmbedded", + "NIOPosix", + "_NIOConcurrency", + "NIOTLS", + "NIOHTTP1", + "NIOConcurrencyHelpers", + "NIOFoundationCompat", + "NIOWebSocket", + "NIOTestUtils", + "_NIOFileSystem", + "_NIOFileSystemFoundationCompat" + ] + }, + { + "name": "CNIODarwin", + "c99name": "CNIODarwin", + "src_type": "clang", + "label": "@swiftpkg_swift_nio//:CNIODarwin.rspm", + "package_identity": "swift-nio", + "product_memberships": [ + "NIOCore", + "NIO", + "NIOEmbedded", + "NIOPosix", + "_NIOConcurrency", + "NIOTLS", + "NIOHTTP1", + "NIOFoundationCompat", + "NIOWebSocket", + "NIOTestUtils", + "_NIOFileSystem", + "_NIOFileSystemFoundationCompat" + ] + }, + { + "name": "CNIOLLHTTP", + "c99name": "CNIOLLHTTP", + "src_type": "clang", + "label": "@swiftpkg_swift_nio//:CNIOLLHTTP.rspm", + "package_identity": "swift-nio", + "product_memberships": [ + "NIOHTTP1", + "NIOWebSocket", + "NIOTestUtils" + ] + }, + { + "name": "CNIOLinux", + "c99name": "CNIOLinux", + "src_type": "clang", + "label": "@swiftpkg_swift_nio//:CNIOLinux.rspm", + "package_identity": "swift-nio", + "product_memberships": [ + "NIOCore", + "NIO", + "NIOEmbedded", + "NIOPosix", + "_NIOConcurrency", + "NIOTLS", + "NIOHTTP1", + "NIOFoundationCompat", + "NIOWebSocket", + "NIOTestUtils", + "_NIOFileSystem", + "_NIOFileSystemFoundationCompat" + ] + }, + { + "name": "CNIOSHA1", + "c99name": "CNIOSHA1", + "src_type": "clang", + "label": "@swiftpkg_swift_nio//:CNIOSHA1.rspm", + "package_identity": "swift-nio", + "product_memberships": [ + "NIOWebSocket" + ] + }, + { + "name": "CNIOWindows", + "c99name": "CNIOWindows", + "src_type": "clang", + "label": "@swiftpkg_swift_nio//:CNIOWindows.rspm", + "package_identity": "swift-nio", + "product_memberships": [ + "NIOCore", + "NIO", + "NIOEmbedded", + "NIOPosix", + "_NIOConcurrency", + "NIOTLS", + "NIOHTTP1", + "NIOFoundationCompat", + "NIOWebSocket", + "NIOTestUtils", + "_NIOFileSystem", + "_NIOFileSystemFoundationCompat" + ] + }, + { + "name": "NIO", + "c99name": "NIO", + "src_type": "swift", + "label": "@swiftpkg_swift_nio//:NIO.rspm", + "package_identity": "swift-nio", + "product_memberships": [ + "NIO", + "_NIOConcurrency", + "NIOTLS", + "NIOHTTP1", + "NIOFoundationCompat", + "NIOWebSocket", + "NIOTestUtils" + ] + }, + { + "name": "NIOConcurrencyHelpers", + "c99name": "NIOConcurrencyHelpers", + "src_type": "swift", + "label": "@swiftpkg_swift_nio//:NIOConcurrencyHelpers.rspm", + "package_identity": "swift-nio", + "product_memberships": [ + "NIOCore", + "NIO", + "NIOEmbedded", + "NIOPosix", + "_NIOConcurrency", + "NIOTLS", + "NIOHTTP1", + "NIOConcurrencyHelpers", + "NIOFoundationCompat", + "NIOWebSocket", + "NIOTestUtils", + "_NIOFileSystem", + "_NIOFileSystemFoundationCompat" + ] + }, + { + "name": "NIOCore", + "c99name": "NIOCore", + "src_type": "swift", + "label": "@swiftpkg_swift_nio//:NIOCore.rspm", + "package_identity": "swift-nio", + "product_memberships": [ + "NIOCore", + "NIO", + "NIOEmbedded", + "NIOPosix", + "_NIOConcurrency", + "NIOTLS", + "NIOHTTP1", + "NIOFoundationCompat", + "NIOWebSocket", + "NIOTestUtils", + "_NIOFileSystem", + "_NIOFileSystemFoundationCompat" + ] + }, + { + "name": "NIOEmbedded", + "c99name": "NIOEmbedded", + "src_type": "swift", + "label": "@swiftpkg_swift_nio//:NIOEmbedded.rspm", + "package_identity": "swift-nio", + "product_memberships": [ + "NIO", + "NIOEmbedded", + "_NIOConcurrency", + "NIOTLS", + "NIOHTTP1", + "NIOFoundationCompat", + "NIOWebSocket", + "NIOTestUtils" + ] + }, + { + "name": "NIOFileSystem", + "c99name": "NIOFileSystem", + "src_type": "swift", + "label": "@swiftpkg_swift_nio//:NIOFileSystem.rspm", + "package_identity": "swift-nio", + "product_memberships": [ + "_NIOFileSystem" + ] + }, + { + "name": "NIOFoundationCompat", + "c99name": "NIOFoundationCompat", + "src_type": "swift", + "label": "@swiftpkg_swift_nio//:NIOFoundationCompat.rspm", + "package_identity": "swift-nio", + "product_memberships": [ + "NIOFoundationCompat" + ] + }, + { + "name": "NIOHTTP1", + "c99name": "NIOHTTP1", + "src_type": "swift", + "label": "@swiftpkg_swift_nio//:NIOHTTP1.rspm", + "package_identity": "swift-nio", + "product_memberships": [ + "NIOHTTP1", + "NIOWebSocket", + "NIOTestUtils" + ] + }, + { + "name": "NIOPosix", + "c99name": "NIOPosix", + "src_type": "swift", + "label": "@swiftpkg_swift_nio//:NIOPosix.rspm", + "package_identity": "swift-nio", + "product_memberships": [ + "NIO", + "NIOPosix", + "_NIOConcurrency", + "NIOTLS", + "NIOHTTP1", + "NIOFoundationCompat", + "NIOWebSocket", + "NIOTestUtils", + "_NIOFileSystem", + "_NIOFileSystemFoundationCompat" + ] + }, + { + "name": "NIOTLS", + "c99name": "NIOTLS", + "src_type": "swift", + "label": "@swiftpkg_swift_nio//:NIOTLS.rspm", + "package_identity": "swift-nio", + "product_memberships": [ + "NIOTLS" + ] + }, + { + "name": "NIOTestUtils", + "c99name": "NIOTestUtils", + "src_type": "swift", + "label": "@swiftpkg_swift_nio//:NIOTestUtils.rspm", + "package_identity": "swift-nio", + "product_memberships": [ + "NIOTestUtils" + ] + }, + { + "name": "NIOWebSocket", + "c99name": "NIOWebSocket", + "src_type": "swift", + "label": "@swiftpkg_swift_nio//:NIOWebSocket.rspm", + "package_identity": "swift-nio", + "product_memberships": [ + "NIOWebSocket" + ] + }, + { + "name": "_NIOBase64", + "c99name": "_NIOBase64", + "src_type": "swift", + "label": "@swiftpkg_swift_nio//:_NIOBase64.rspm", + "package_identity": "swift-nio", + "product_memberships": [ + "NIOCore", + "NIO", + "NIOEmbedded", + "NIOPosix", + "_NIOConcurrency", + "NIOTLS", + "NIOHTTP1", + "NIOFoundationCompat", + "NIOWebSocket", + "NIOTestUtils", + "_NIOFileSystem", + "_NIOFileSystemFoundationCompat" + ] + }, + { + "name": "_NIOConcurrency", + "c99name": "_NIOConcurrency", + "src_type": "swift", + "label": "@swiftpkg_swift_nio//:_NIOConcurrency.rspm", + "package_identity": "swift-nio", + "product_memberships": [ + "_NIOConcurrency" + ] + }, + { + "name": "_NIODataStructures", + "c99name": "_NIODataStructures", + "src_type": "swift", + "label": "@swiftpkg_swift_nio//:_NIODataStructures.rspm", + "package_identity": "swift-nio", + "product_memberships": [ + "NIOCore", + "NIO", + "NIOEmbedded", + "NIOPosix", + "_NIOConcurrency", + "NIOTLS", + "NIOHTTP1", + "NIOFoundationCompat", + "NIOWebSocket", + "NIOTestUtils", + "_NIOFileSystem", + "_NIOFileSystemFoundationCompat" + ] + }, + { + "name": "_NIOFileSystem", + "c99name": "_NIOFileSystem", + "src_type": "swift", + "label": "@swiftpkg_swift_nio//:_NIOFileSystem.rspm", + "package_identity": "swift-nio", + "product_memberships": [ + "_NIOFileSystem", + "_NIOFileSystemFoundationCompat" + ] + }, + { + "name": "_NIOFileSystemFoundationCompat", + "c99name": "_NIOFileSystemFoundationCompat", + "src_type": "swift", + "label": "@swiftpkg_swift_nio//:_NIOFileSystemFoundationCompat.rspm", + "package_identity": "swift-nio", + "product_memberships": [ + "_NIOFileSystemFoundationCompat" + ] + }, + { + "name": "CNIOExtrasZlib", + "c99name": "CNIOExtrasZlib", + "src_type": "clang", + "label": "@swiftpkg_swift_nio_extras//:CNIOExtrasZlib.rspm", + "package_identity": "swift-nio-extras", + "product_memberships": [ + "NIOHTTPCompression" + ] + }, + { + "name": "NIOExtras", + "c99name": "NIOExtras", + "src_type": "swift", + "label": "@swiftpkg_swift_nio_extras//:NIOExtras.rspm", + "package_identity": "swift-nio-extras", + "product_memberships": [ + "NIOExtras" + ] + }, + { + "name": "NIOHTTPCompression", + "c99name": "NIOHTTPCompression", + "src_type": "swift", + "label": "@swiftpkg_swift_nio_extras//:NIOHTTPCompression.rspm", + "package_identity": "swift-nio-extras", + "product_memberships": [ + "NIOHTTPCompression" + ] + }, + { + "name": "NIOHTTPTypes", + "c99name": "NIOHTTPTypes", + "src_type": "swift", + "label": "@swiftpkg_swift_nio_extras//:NIOHTTPTypes.rspm", + "package_identity": "swift-nio-extras", + "product_memberships": [ + "NIOHTTPTypes", + "NIOHTTPTypesHTTP1", + "NIOHTTPTypesHTTP2" + ] + }, + { + "name": "NIOHTTPTypesHTTP1", + "c99name": "NIOHTTPTypesHTTP1", + "src_type": "swift", + "label": "@swiftpkg_swift_nio_extras//:NIOHTTPTypesHTTP1.rspm", + "package_identity": "swift-nio-extras", + "product_memberships": [ + "NIOHTTPTypesHTTP1" + ] + }, + { + "name": "NIOHTTPTypesHTTP2", + "c99name": "NIOHTTPTypesHTTP2", + "src_type": "swift", + "label": "@swiftpkg_swift_nio_extras//:NIOHTTPTypesHTTP2.rspm", + "package_identity": "swift-nio-extras", + "product_memberships": [ + "NIOHTTPTypesHTTP2" + ] + }, + { + "name": "NIOSOCKS", + "c99name": "NIOSOCKS", + "src_type": "swift", + "label": "@swiftpkg_swift_nio_extras//:NIOSOCKS.rspm", + "package_identity": "swift-nio-extras", + "product_memberships": [ + "NIOSOCKS" + ] + }, + { + "name": "NIOHPACK", + "c99name": "NIOHPACK", + "src_type": "swift", + "label": "@swiftpkg_swift_nio_http2//:NIOHPACK.rspm", + "package_identity": "swift-nio-http2", + "product_memberships": [ + "NIOHTTP2" + ] + }, + { + "name": "NIOHTTP2", + "c99name": "NIOHTTP2", + "src_type": "swift", + "label": "@swiftpkg_swift_nio_http2//:NIOHTTP2.rspm", + "package_identity": "swift-nio-http2", + "product_memberships": [ + "NIOHTTP2" + ] + }, + { + "name": "CNIOBoringSSL", + "c99name": "CNIOBoringSSL", + "src_type": "clang", + "label": "@swiftpkg_swift_nio_ssl//:CNIOBoringSSL.rspm", + "package_identity": "swift-nio-ssl", + "product_memberships": [ + "NIOSSL", + "NIOTLSServer", + "NIOSSLHTTP1Client" + ] + }, + { + "name": "CNIOBoringSSLShims", + "c99name": "CNIOBoringSSLShims", + "src_type": "clang", + "label": "@swiftpkg_swift_nio_ssl//:CNIOBoringSSLShims.rspm", + "package_identity": "swift-nio-ssl", + "product_memberships": [ + "NIOSSL", + "NIOTLSServer", + "NIOSSLHTTP1Client" + ] + }, + { + "name": "NIOSSL", + "c99name": "NIOSSL", + "src_type": "swift", + "label": "@swiftpkg_swift_nio_ssl//:NIOSSL.rspm", + "package_identity": "swift-nio-ssl", + "product_memberships": [ + "NIOSSL", + "NIOTLSServer", + "NIOSSLHTTP1Client" + ] + }, + { + "name": "NIOSSLHTTP1Client", + "c99name": "NIOSSLHTTP1Client", + "src_type": "swift", + "label": "@swiftpkg_swift_nio_ssl//:NIOSSLHTTP1Client.rspm", + "package_identity": "swift-nio-ssl", + "product_memberships": [ + "NIOSSLHTTP1Client" + ] + }, + { + "name": "NIOTLSServer", + "c99name": "NIOTLSServer", + "src_type": "swift", + "label": "@swiftpkg_swift_nio_ssl//:NIOTLSServer.rspm", + "package_identity": "swift-nio-ssl", + "product_memberships": [ + "NIOTLSServer" + ] + }, + { + "name": "NIOTransportServices", + "c99name": "NIOTransportServices", + "src_type": "swift", + "label": "@swiftpkg_swift_nio_transport_services//:NIOTransportServices.rspm", + "package_identity": "swift-nio-transport-services", + "product_memberships": [ + "NIOTransportServices" + ] + }, + { + "name": "ComplexModule", + "c99name": "ComplexModule", + "src_type": "swift", + "label": "@swiftpkg_swift_numerics//:ComplexModule.rspm", + "package_identity": "swift-numerics", + "product_memberships": [ + "ComplexModule", + "Numerics" + ] + }, + { + "name": "Numerics", + "c99name": "Numerics", + "src_type": "swift", + "label": "@swiftpkg_swift_numerics//:Numerics.rspm", + "package_identity": "swift-numerics", + "product_memberships": [ + "Numerics" + ] + }, + { + "name": "RealModule", + "c99name": "RealModule", + "src_type": "swift", + "label": "@swiftpkg_swift_numerics//:RealModule.rspm", + "package_identity": "swift-numerics", + "product_memberships": [ + "ComplexModule", + "Numerics", + "RealModule" + ] + }, + { + "name": "_NumericsShims", + "c99name": "_NumericsShims", + "src_type": "clang", + "label": "@swiftpkg_swift_numerics//:_NumericsShims.rspm", + "package_identity": "swift-numerics", + "product_memberships": [ + "ComplexModule", + "Numerics", + "RealModule" + ] + }, + { + "name": "SwiftSMTP", + "c99name": "SwiftSMTP", + "src_type": "swift", + "label": "@swiftpkg_swift_smtp//:SwiftSMTP.rspm", + "package_identity": "swift-smtp", + "product_memberships": [ + "SwiftSMTP", + "SwiftSMTPVapor" + ] + }, + { + "name": "SwiftSMTPVapor", + "c99name": "SwiftSMTPVapor", + "src_type": "swift", + "label": "@swiftpkg_swift_smtp//:SwiftSMTPVapor.rspm", + "package_identity": "swift-smtp", + "product_memberships": [ + "SwiftSMTPVapor" + ] + }, + { + "name": "CSystem", + "c99name": "CSystem", + "src_type": "clang", + "label": "@swiftpkg_swift_system//:CSystem.rspm", + "package_identity": "swift-system", + "product_memberships": [ + "SystemPackage" + ] + }, + { + "name": "SystemPackage", + "c99name": "SystemPackage", + "src_type": "swift", + "label": "@swiftpkg_swift_system//:SystemPackage.rspm", + "package_identity": "swift-system", + "product_memberships": [ + "SystemPackage" + ] + }, + { + "name": "CVaporBcrypt", + "c99name": "CVaporBcrypt", + "src_type": "clang", + "label": "@swiftpkg_vapor//:CVaporBcrypt.rspm", + "package_identity": "vapor", + "product_memberships": [ + "Vapor", + "XCTVapor" + ] + }, + { + "name": "Vapor", + "c99name": "Vapor", + "src_type": "swift", + "label": "@swiftpkg_vapor//:Vapor.rspm", + "package_identity": "vapor", + "product_memberships": [ + "Vapor", + "XCTVapor" + ] + }, + { + "name": "XCTVapor", + "c99name": "XCTVapor", + "src_type": "swift", + "label": "@swiftpkg_vapor//:XCTVapor.rspm", + "package_identity": "vapor", + "product_memberships": [ + "XCTVapor" + ] + }, + { + "name": "WebSocketKit", + "c99name": "WebSocketKit", + "src_type": "swift", + "label": "@swiftpkg_websocket_kit//:WebSocketKit.rspm", + "package_identity": "websocket-kit", + "product_memberships": [ + "WebSocketKit" + ] + } + ], + "products": [ + { + "identity": "async-http-client", + "name": "AsyncHTTPClient", + "type": "library", + "label": "@swiftpkg_async_http_client//:AsyncHTTPClient" + }, + { + "identity": "async-kit", + "name": "AsyncKit", + "type": "library", + "label": "@swiftpkg_async_kit//:AsyncKit" + }, + { + "identity": "console-kit", + "name": "ConsoleKit", + "type": "library", + "label": "@swiftpkg_console_kit//:ConsoleKit" + }, + { + "identity": "console-kit", + "name": "ConsoleKitCommands", + "type": "library", + "label": "@swiftpkg_console_kit//:ConsoleKitCommands" + }, + { + "identity": "console-kit", + "name": "ConsoleKitTerminal", + "type": "library", + "label": "@swiftpkg_console_kit//:ConsoleKitTerminal" + }, + { + "identity": "multipart-kit", + "name": "MultipartKit", + "type": "library", + "label": "@swiftpkg_multipart_kit//:MultipartKit" + }, + { + "identity": "routing-kit", + "name": "RoutingKit", + "type": "library", + "label": "@swiftpkg_routing_kit//:RoutingKit" + }, + { + "identity": "swift-algorithms", + "name": "Algorithms", + "type": "library", + "label": "@swiftpkg_swift_algorithms//:Algorithms" + }, + { + "identity": "swift-atomics", + "name": "Atomics", + "type": "library", + "label": "@swiftpkg_swift_atomics//:Atomics" + }, + { + "identity": "swift-collections", + "name": "BitCollections", + "type": "library", + "label": "@swiftpkg_swift_collections//:BitCollections" + }, + { + "identity": "swift-collections", + "name": "Collections", + "type": "library", + "label": "@swiftpkg_swift_collections//:Collections" + }, + { + "identity": "swift-collections", + "name": "DequeModule", + "type": "library", + "label": "@swiftpkg_swift_collections//:DequeModule" + }, + { + "identity": "swift-collections", + "name": "HashTreeCollections", + "type": "library", + "label": "@swiftpkg_swift_collections//:HashTreeCollections" + }, + { + "identity": "swift-collections", + "name": "HeapModule", + "type": "library", + "label": "@swiftpkg_swift_collections//:HeapModule" + }, + { + "identity": "swift-collections", + "name": "OrderedCollections", + "type": "library", + "label": "@swiftpkg_swift_collections//:OrderedCollections" + }, + { + "identity": "swift-collections", + "name": "_RopeModule", + "type": "library", + "label": "@swiftpkg_swift_collections//:_RopeModule" + }, + { + "identity": "swift-crypto", + "name": "Crypto", + "type": "library", + "label": "@swiftpkg_swift_crypto//:Crypto" + }, + { + "identity": "swift-crypto", + "name": "_CryptoExtras", + "type": "library", + "label": "@swiftpkg_swift_crypto//:_CryptoExtras" + }, + { + "identity": "swift-http-types", + "name": "HTTPTypes", + "type": "library", + "label": "@swiftpkg_swift_http_types//:HTTPTypes" + }, + { + "identity": "swift-http-types", + "name": "HTTPTypesFoundation", + "type": "library", + "label": "@swiftpkg_swift_http_types//:HTTPTypesFoundation" + }, + { + "identity": "swift-log", + "name": "Logging", + "type": "library", + "label": "@swiftpkg_swift_log//:Logging" + }, + { + "identity": "swift-metrics", + "name": "CoreMetrics", + "type": "library", + "label": "@swiftpkg_swift_metrics//:CoreMetrics" + }, + { + "identity": "swift-metrics", + "name": "Metrics", + "type": "library", + "label": "@swiftpkg_swift_metrics//:Metrics" + }, + { + "identity": "swift-metrics", + "name": "MetricsTestKit", + "type": "library", + "label": "@swiftpkg_swift_metrics//:MetricsTestKit" + }, + { + "identity": "swift-nio-extras", + "name": "NIOExtras", + "type": "library", + "label": "@swiftpkg_swift_nio_extras//:NIOExtras" + }, + { + "identity": "swift-nio-extras", + "name": "NIOHTTPCompression", + "type": "library", + "label": "@swiftpkg_swift_nio_extras//:NIOHTTPCompression" + }, + { + "identity": "swift-nio-extras", + "name": "NIOHTTPTypes", + "type": "library", + "label": "@swiftpkg_swift_nio_extras//:NIOHTTPTypes" + }, + { + "identity": "swift-nio-extras", + "name": "NIOHTTPTypesHTTP1", + "type": "library", + "label": "@swiftpkg_swift_nio_extras//:NIOHTTPTypesHTTP1" + }, + { + "identity": "swift-nio-extras", + "name": "NIOHTTPTypesHTTP2", + "type": "library", + "label": "@swiftpkg_swift_nio_extras//:NIOHTTPTypesHTTP2" + }, + { + "identity": "swift-nio-extras", + "name": "NIOSOCKS", + "type": "library", + "label": "@swiftpkg_swift_nio_extras//:NIOSOCKS" + }, + { + "identity": "swift-nio-http2", + "name": "NIOHTTP2", + "type": "library", + "label": "@swiftpkg_swift_nio_http2//:NIOHTTP2" + }, + { + "identity": "swift-nio-ssl", + "name": "NIOSSL", + "type": "library", + "label": "@swiftpkg_swift_nio_ssl//:NIOSSL" + }, + { + "identity": "swift-nio-ssl", + "name": "NIOSSLHTTP1Client", + "type": "executable", + "label": "@swiftpkg_swift_nio_ssl//:NIOSSLHTTP1Client" + }, + { + "identity": "swift-nio-ssl", + "name": "NIOTLSServer", + "type": "executable", + "label": "@swiftpkg_swift_nio_ssl//:NIOTLSServer" + }, + { + "identity": "swift-nio-transport-services", + "name": "NIOTransportServices", + "type": "library", + "label": "@swiftpkg_swift_nio_transport_services//:NIOTransportServices" + }, + { + "identity": "swift-nio", + "name": "NIO", + "type": "library", + "label": "@swiftpkg_swift_nio//:NIO" + }, + { + "identity": "swift-nio", + "name": "NIOConcurrencyHelpers", + "type": "library", + "label": "@swiftpkg_swift_nio//:NIOConcurrencyHelpers" + }, + { + "identity": "swift-nio", + "name": "NIOCore", + "type": "library", + "label": "@swiftpkg_swift_nio//:NIOCore" + }, + { + "identity": "swift-nio", + "name": "NIOEmbedded", + "type": "library", + "label": "@swiftpkg_swift_nio//:NIOEmbedded" + }, + { + "identity": "swift-nio", + "name": "NIOFoundationCompat", + "type": "library", + "label": "@swiftpkg_swift_nio//:NIOFoundationCompat" + }, + { + "identity": "swift-nio", + "name": "NIOHTTP1", + "type": "library", + "label": "@swiftpkg_swift_nio//:NIOHTTP1" + }, + { + "identity": "swift-nio", + "name": "NIOPosix", + "type": "library", + "label": "@swiftpkg_swift_nio//:NIOPosix" + }, + { + "identity": "swift-nio", + "name": "NIOTLS", + "type": "library", + "label": "@swiftpkg_swift_nio//:NIOTLS" + }, + { + "identity": "swift-nio", + "name": "NIOTestUtils", + "type": "library", + "label": "@swiftpkg_swift_nio//:NIOTestUtils" + }, + { + "identity": "swift-nio", + "name": "NIOWebSocket", + "type": "library", + "label": "@swiftpkg_swift_nio//:NIOWebSocket" + }, + { + "identity": "swift-nio", + "name": "_NIOConcurrency", + "type": "library", + "label": "@swiftpkg_swift_nio//:_NIOConcurrency" + }, + { + "identity": "swift-nio", + "name": "_NIOFileSystem", + "type": "library", + "label": "@swiftpkg_swift_nio//:_NIOFileSystem" + }, + { + "identity": "swift-nio", + "name": "_NIOFileSystemFoundationCompat", + "type": "library", + "label": "@swiftpkg_swift_nio//:_NIOFileSystemFoundationCompat" + }, + { + "identity": "swift-numerics", + "name": "ComplexModule", + "type": "library", + "label": "@swiftpkg_swift_numerics//:ComplexModule" + }, + { + "identity": "swift-numerics", + "name": "Numerics", + "type": "library", + "label": "@swiftpkg_swift_numerics//:Numerics" + }, + { + "identity": "swift-numerics", + "name": "RealModule", + "type": "library", + "label": "@swiftpkg_swift_numerics//:RealModule" + }, + { + "identity": "swift-smtp", + "name": "SwiftSMTP", + "type": "library", + "label": "@swiftpkg_swift_smtp//:SwiftSMTP" + }, + { + "identity": "swift-smtp", + "name": "SwiftSMTPVapor", + "type": "library", + "label": "@swiftpkg_swift_smtp//:SwiftSMTPVapor" + }, + { + "identity": "swift-system", + "name": "SystemPackage", + "type": "library", + "label": "@swiftpkg_swift_system//:SystemPackage" + }, + { + "identity": "vapor", + "name": "Vapor", + "type": "library", + "label": "@swiftpkg_vapor//:Vapor" + }, + { + "identity": "vapor", + "name": "XCTVapor", + "type": "library", + "label": "@swiftpkg_vapor//:XCTVapor" + }, + { + "identity": "websocket-kit", + "name": "WebSocketKit", + "type": "library", + "label": "@swiftpkg_websocket_kit//:WebSocketKit" + } + ], + "packages": [ + { + "name": "swiftpkg_async_http_client", + "identity": "async-http-client", + "remote": { + "commit": "fb308ee72f3d4c082a507033f94afa7395963ef3", + "remote": "https://github.com/swift-server/async-http-client.git", + "version": "1.21.0" + } + }, + { + "name": "swiftpkg_async_kit", + "identity": "async-kit", + "remote": { + "commit": "7ece208cd401687641c88367a00e3ea2b04311f1", + "remote": "https://github.com/vapor/async-kit.git", + "version": "1.19.0" + } + }, + { + "name": "swiftpkg_console_kit", + "identity": "console-kit", + "remote": { + "commit": "a31f44ebfbd15a2cc0fda705279676773ac16355", + "remote": "https://github.com/vapor/console-kit.git", + "version": "4.14.1" + } + }, + { + "name": "swiftpkg_multipart_kit", + "identity": "multipart-kit", + "remote": { + "commit": "12ee56f25bd3fc4c2d09c2aa16e69de61dc786e8", + "remote": "https://github.com/vapor/multipart-kit.git", + "version": "4.6.0" + } + }, + { + "name": "swiftpkg_routing_kit", + "identity": "routing-kit", + "remote": { + "commit": "2a92a7eac411a82fb3a03731be5e76773ebe1b3e", + "remote": "https://github.com/vapor/routing-kit.git", + "version": "4.9.0" + } + }, + { + "name": "swiftpkg_swift_algorithms", + "identity": "swift-algorithms", + "remote": { + "commit": "f6919dfc309e7f1b56224378b11e28bab5bccc42", + "remote": "https://github.com/apple/swift-algorithms.git", + "version": "1.2.0" + } + }, + { + "name": "swiftpkg_swift_atomics", + "identity": "swift-atomics", + "remote": { + "commit": "cd142fd2f64be2100422d658e7411e39489da985", + "remote": "https://github.com/apple/swift-atomics.git", + "version": "1.2.0" + } + }, + { + "name": "swiftpkg_swift_collections", + "identity": "swift-collections", + "remote": { + "commit": "94cf62b3ba8d4bed62680a282d4c25f9c63c2efb", + "remote": "https://github.com/apple/swift-collections.git", + "version": "1.1.0" + } + }, + { + "name": "swiftpkg_swift_crypto", + "identity": "swift-crypto", + "remote": { + "commit": "f0525da24dc3c6cbb2b6b338b65042bc91cbc4bb", + "remote": "https://github.com/apple/swift-crypto.git", + "version": "3.3.0" + }, + "cxxLanguageStandard": "c++11" + }, + { + "name": "swiftpkg_swift_http_types", + "identity": "swift-http-types", + "remote": { + "commit": "12358d55a3824bd5fed310b999ea8cf83a9a1a65", + "remote": "https://github.com/apple/swift-http-types", + "version": "1.0.3" + } + }, + { + "name": "swiftpkg_swift_log", + "identity": "swift-log", + "remote": { + "commit": "e97a6fcb1ab07462881ac165fdbb37f067e205d5", + "remote": "https://github.com/apple/swift-log.git", + "version": "1.5.4" + } + }, + { + "name": "swiftpkg_swift_metrics", + "identity": "swift-metrics", + "remote": { + "commit": "971ba26378ab69c43737ee7ba967a896cb74c0d1", + "remote": "https://github.com/apple/swift-metrics.git", + "version": "2.4.1" + } + }, + { + "name": "swiftpkg_swift_nio", + "identity": "swift-nio", + "remote": { + "commit": "359c461e5561d22c6334828806cc25d759ca7aa6", + "remote": "https://github.com/apple/swift-nio", + "version": "2.65.0" + } + }, + { + "name": "swiftpkg_swift_nio_extras", + "identity": "swift-nio-extras", + "remote": { + "commit": "a3b640d7dc567225db7c94386a6e71aded1bfa63", + "remote": "https://github.com/apple/swift-nio-extras", + "version": "1.22.0" + } + }, + { + "name": "swiftpkg_swift_nio_http2", + "identity": "swift-nio-http2", + "remote": { + "commit": "c6afe04165c865faaa687b42c32ed76dfcc91076", + "remote": "https://github.com/apple/swift-nio-http2.git", + "version": "1.31.0" + } + }, + { + "name": "swiftpkg_swift_nio_ssl", + "identity": "swift-nio-ssl", + "remote": { + "commit": "7c381eb6083542b124a6c18fae742f55001dc2b5", + "remote": "https://github.com/apple/swift-nio-ssl", + "version": "2.26.0" + }, + "cxxLanguageStandard": "c++14" + }, + { + "name": "swiftpkg_swift_nio_transport_services", + "identity": "swift-nio-transport-services", + "remote": { + "commit": "6cbe0ed2b394f21ab0d46b9f0c50c6be964968ce", + "remote": "https://github.com/apple/swift-nio-transport-services.git", + "version": "1.20.1" + } + }, + { + "name": "swiftpkg_swift_numerics", + "identity": "swift-numerics", + "remote": { + "commit": "0a5bc04095a675662cf24757cc0640aa2204253b", + "remote": "https://github.com/apple/swift-numerics.git", + "version": "1.0.2" + } + }, + { + "name": "swiftpkg_swift_smtp", + "identity": "swift-smtp", + "remote": { + "commit": "46e9ef4c2a2808011aaf0ed62f9968da2b757a2d", + "remote": "https://github.com/sersoft-gmbh/swift-smtp", + "version": "2.10.0" + } + }, + { + "name": "swiftpkg_swift_system", + "identity": "swift-system", + "remote": { + "commit": "025bcb1165deab2e20d4eaba79967ce73013f496", + "remote": "https://github.com/apple/swift-system.git", + "version": "1.2.1" + } + }, + { + "name": "swiftpkg_vapor", + "identity": "vapor", + "remote": { + "commit": "e5cb0abdadff95ef996fafd6268f2f5f8cba6325", + "remote": "https://github.com/vapor/vapor", + "version": "4.94.1" + } + }, + { + "name": "swiftpkg_websocket_kit", + "identity": "websocket-kit", + "remote": { + "commit": "4232d34efa49f633ba61afde365d3896fc7f8740", + "remote": "https://github.com/vapor/websocket-kit.git", + "version": "2.15.0" + } + } + ] +} \ No newline at end of file From b28e53181b2d6a875d62e81b66b6ba313df90fa5 Mon Sep 17 00:00:00 2001 From: Derek Leung Date: Fri, 3 May 2024 22:19:39 +0100 Subject: [PATCH 2/2] Add preserve_ordering parameter into to_starlark --- swiftpkg/internal/bzl_selects.bzl | 29 ++++++++++++++-------- swiftpkg/internal/swiftpkg_build_files.bzl | 2 +- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/swiftpkg/internal/bzl_selects.bzl b/swiftpkg/internal/bzl_selects.bzl index dad167f33..6e825c1d2 100644 --- a/swiftpkg/internal/bzl_selects.bzl +++ b/swiftpkg/internal/bzl_selects.bzl @@ -133,7 +133,7 @@ _noop_kind_handler = _new_kind_handler( transform = lambda v: v, ) -def _to_starlark(values, kind_handlers = {}): +def _to_starlark(values, kind_handlers = {}, preserve_ordering = False): """Converts the provied values into Starlark using the information in the \ kind handlers. @@ -141,6 +141,8 @@ def _to_starlark(values, kind_handlers = {}): values: A `list` of values that are processed and added to the output. kind_handlers: A `dict` of king handler `struct` values (`bzl_selects.new_kind_handler`). + preserve_ordering: A `bool` for keeping the processing as lists instead of + sets that deduplicate entries. Returns: A `struct` as returned by `starlark_codegen.new_expr`. @@ -152,40 +154,45 @@ def _to_starlark(values, kind_handlers = {}): # dict whose keys are the conditions and the value is the value for the # condition. selects_by_kind = {} - no_condition_results = sets.make() + no_condition_results = [] + + def process_list(input): + if preserve_ordering: + return input + return sets.to_list(sets.make(input)) for v in values: v_type = type(v) if v_type != "struct": if v_type == "list": - no_condition_results = sets.union(no_condition_results, sets.make(v)) + no_condition_results.extend(v) else: - sets.insert(no_condition_results, v) + no_condition_results.append(v) continue # We are assuming that the select will always result in a list. # Hence, we wrap the transformed value in a list. kind_handler = kind_handlers.get(v.kind, _noop_kind_handler) - tvs_set = sets.make(lists.flatten(kind_handler.transform(v.value))) + tvs_set = lists.flatten(kind_handler.transform(v.value)) if v.condition != None: # Collect all of the values associted with a condition. select_dict = selects_by_kind.get(v.kind, {}) - condition_values = select_dict.get(v.condition, sets.make()) - condition_values = sets.union(condition_values, tvs_set) + condition_values = sets.to_list(select_dict.get(v.condition, sets.make())) + condition_values = condition_values.extend(tvs_set) select_dict[v.condition] = condition_values selects_by_kind[v.kind] = select_dict else: - no_condition_results = sets.union(no_condition_results, tvs_set) + no_condition_results.extend(tvs_set) expr_members = [] - if sets.length(no_condition_results) > 0: - expr_members.append(sets.to_list(no_condition_results)) + if len(no_condition_results) > 0: + expr_members.append(process_list(no_condition_results)) for (kind, select_dict) in selects_by_kind.items(): if len(expr_members) > 0: expr_members.append(scg.new_op("+")) sorted_keys = sorted(select_dict.keys()) new_select_dict = { - k: sets.to_list(select_dict[k]) + k: process_list(select_dict[k]) for k in sorted_keys } kind_handler = kind_handlers.get(kind, _noop_kind_handler) diff --git a/swiftpkg/internal/swiftpkg_build_files.bzl b/swiftpkg/internal/swiftpkg_build_files.bzl index 3696caf63..281da32ba 100644 --- a/swiftpkg/internal/swiftpkg_build_files.bzl +++ b/swiftpkg/internal/swiftpkg_build_files.bzl @@ -106,7 +106,7 @@ def _swift_target_build_file(pkg_ctx, target): if len(defines) > 0: attrs["defines"] = bzl_selects.to_starlark(defines) if len(copts) > 0: - attrs["copts"] = bzl_selects.to_starlark(copts) + attrs["copts"] = bzl_selects.to_starlark(copts, preserve_ordering = True) res_build_file = _handle_target_resources( pkg_ctx,