Skip to content

Commit

Permalink
trying with explicit platform
Browse files Browse the repository at this point in the history
  • Loading branch information
mamunto committed Nov 7, 2024
1 parent e4631f3 commit bbc08ab
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Sources/Exporters/DataCompression/DataCompression.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@


import Foundation
// Excluding linux
#if canImport(Compression)

#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
import Compression

public extension Data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
// SPDX-License-Identifier: Apache-2.0
//

#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
import DataCompression
#endif
import Foundation
import SwiftProtobuf
import OpenTelemetryProtocolExporterCommon
Expand Down Expand Up @@ -40,8 +42,7 @@ public class OtlpHttpExporterBase {

var compressedData = rawData

// Skip for linux
#if canImport(Compression)
#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
switch config.compression {
case .gzip:
if let data = rawData.gzip() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
// SPDX-License-Identifier: Apache-2.0
//

#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
import DataCompression
#endif
import Foundation
import OpenTelemetryProtocolExporterCommon
import SwiftProtobuf
Expand Down Expand Up @@ -52,8 +54,7 @@ public class StableOtlpHTTPExporterBase {

var compressedData = rawData

// Skip for linux
#if canImport(Compression)
#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
switch config.compression {
case .gzip:
if let data = rawData.gzip() {
Expand Down

0 comments on commit bbc08ab

Please sign in to comment.