Browse Source

Add underscored products for v2 (#1978)

Motivation:

Some users want to kick the tyres of v2, to do that they need a product
to depend on.

Modifications:

- Add a general 'GRPCHTTP2Transport' target which exports the both
  NIOPosix transport and the NIOTS transport.
- Add a '_GRPCHTTP2Transport' product
- Add a '_GRPCInProcessTransport' product
- Add exported imports to the h2 transport and in-process transport so
  the core module isn't explicitly required

Result:

Users can depend on pre-release products which lack stable API
guarantees
George Barnett 1 year ago
parent
commit
8ec9bceeea

+ 20 - 0
Sources/GRPCHTTP2Transport/Exports.swift

@@ -0,0 +1,20 @@
+/*
+ * Copyright 2024, gRPC Authors All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+@_exported import GRPCCore
+@_exported import GRPCHTTP2Core
+@_exported import GRPCHTTP2TransportNIOPosix
+@_exported import GRPCHTTP2TransportNIOTransportServices

+ 18 - 0
Sources/GRPCHTTP2TransportNIOPosix/Exports.swift

@@ -0,0 +1,18 @@
+/*
+ * Copyright 2024, gRPC Authors All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+@_exported import GRPCCore
+@_exported import GRPCHTTP2Core

+ 18 - 0
Sources/GRPCHTTP2TransportNIOTransportServices/Exports.swift

@@ -0,0 +1,18 @@
+/*
+ * Copyright 2024, gRPC Authors All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+@_exported import GRPCCore
+@_exported import GRPCHTTP2Core