Skip to content

Commit

Permalink
slim out the dependencies - removing DistributedTracer and deps
Browse files Browse the repository at this point in the history
  • Loading branch information
heckj committed May 1, 2024
1 parent 6055bf2 commit 3f23e76
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 165 deletions.
3 changes: 0 additions & 3 deletions IntegrationTests/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ let package = Package(
products: [],
dependencies: [
.package(path: "../"),
// .package(url: "https://github.com/automerge/automerge-repo-swift.git", branch: "main"),
// Distributed Tracing
// .package(url: "https://github.com/apple/swift-distributed-tracing", from: "1.0.0"),
// Testing Tracing
.package(url: "https://github.com/heckj/DistributedTracer", branch: "main"),
// this ^^ brings in a MASSIVE cascade of dependencies
Expand Down
135 changes: 0 additions & 135 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,6 @@
"version" : "5.3.0"
}
},
{
"identity" : "distributedtracer",
"kind" : "remoteSourceControl",
"location" : "https://github.com/heckj/DistributedTracer",
"state" : {
"branch" : "main",
"revision" : "d34f4367e9a22a210eac3da4c82aceb8d5c2ac66"
}
},
{
"identity" : "float16",
"kind" : "remoteSourceControl",
Expand All @@ -45,15 +36,6 @@
"version" : "1.1.1"
}
},
{
"identity" : "grpc-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/grpc/grpc-swift.git",
"state" : {
"revision" : "393b02b1c39cc82fb24e57f24fa446f43e8124c9",
"version" : "1.22.0"
}
},
{
"identity" : "potentcodables",
"kind" : "remoteSourceControl",
Expand All @@ -72,15 +54,6 @@
"version" : "1.0.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",
Expand Down Expand Up @@ -117,78 +90,6 @@
"version" : "1.0.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.git",
"state" : {
"revision" : "fc63f0cf4e55a4597407a9fc95b16a2bc44b4982",
"version" : "2.64.0"
}
},
{
"identity" : "swift-nio-extras",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-nio-extras.git",
"state" : {
"revision" : "a3b640d7dc567225db7c94386a6e71aded1bfa63",
"version" : "1.22.0"
}
},
{
"identity" : "swift-nio-http2",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-nio-http2.git",
"state" : {
"revision" : "0904bf0feb5122b7e5c3f15db7df0eabe623dd87",
"version" : "1.30.0"
}
},
{
"identity" : "swift-nio-ssl",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-nio-ssl.git",
"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",
Expand All @@ -198,24 +99,6 @@
"version" : "1.0.2"
}
},
{
"identity" : "swift-otel",
"kind" : "remoteSourceControl",
"location" : "https://github.com/slashmo/swift-otel",
"state" : {
"branch" : "main",
"revision" : "0380acdfac239f3c77a819817501ebe2f6dd3a2e"
}
},
{
"identity" : "swift-protobuf",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-protobuf.git",
"state" : {
"revision" : "9f0c76544701845ad98716f3f6a774a892152bcb",
"version" : "1.26.0"
}
},
{
"identity" : "swift-service-context",
"kind" : "remoteSourceControl",
Expand All @@ -224,24 +107,6 @@
"revision" : "ce0141c8f123132dbd02fd45fea448018762df1b",
"version" : "1.0.0"
}
},
{
"identity" : "swift-service-lifecycle",
"kind" : "remoteSourceControl",
"location" : "https://github.com/swift-server/swift-service-lifecycle.git",
"state" : {
"revision" : "d7fe0e731499a8dcce53bf4cbbc812c8e565d3a7",
"version" : "2.4.1"
}
},
{
"identity" : "swift-system",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-system.git",
"state" : {
"revision" : "025bcb1165deab2e20d4eaba79967ce73013f496",
"version" : "1.2.1"
}
}
],
"version" : 2
Expand Down
20 changes: 6 additions & 14 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,12 @@ let package = Package(
.package(url: "https://github.com/automerge/automerge-swift", .upToNextMajor(from: "0.5.7")),
.package(url: "https://github.com/outfoxx/PotentCodables", .upToNextMajor(from: "3.1.0")),
.package(url: "https://github.com/keefertaylor/Base58Swift", .upToNextMajor(from: "2.1.14")),
.package(url: "https://github.com/apple/swift-async-algorithms", from: "1.0.0"),
// Distributed Tracing support
.package(url: "https://github.com/apple/swift-distributed-tracing", from: "1.0.0"),

// Documentation plugin
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"),

// Combine replacement for OSS
.package(url: "https://github.com/apple/swift-async-algorithms", from: "1.0.0"),
// Distributed Tracing
.package(url: "https://github.com/apple/swift-distributed-tracing", from: "1.0.0"),
// Testing Tracing
.package(url: "https://github.com/heckj/DistributedTracer", branch: "main"),
// this ^^ brings in a MASSIVE cascade of dependencies
],
targets: [
.target(
Expand All @@ -43,12 +38,10 @@ let package = Package(
.product(name: "PotentCodables", package: "PotentCodables"),
// BS58 representations of data
.product(name: "Base58Swift", package: "Base58Swift"),

// Combine replacement for OSS
// Async functional algorithms
.product(name: "AsyncAlgorithms", package: "swift-async-algorithms"),

// Distributed Tracing
.product(name: "Tracing", package: "swift-distributed-tracing"),
// Support for distributed tracing
.product(name: "Tracing", package: "swift-distributed-tracing")
],
// borrowing a set of Swift6 enabling features to double-check against
// future proofing concurrency, safety, and exportable feature-creep.
Expand All @@ -63,7 +56,6 @@ let package = Package(
name: "AutomergeRepoTests",
dependencies: [
"AutomergeRepo",
.product(name: "DistributedTracer", package: "DistributedTracer"),
]
),
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
import Automerge
@testable import AutomergeRepo
import AutomergeUtilities
import DistributedTracer
import Foundation
import Logging
import OTel
import OTLPGRPC
import RegexBuilder
import ServiceLifecycle
import Tracing
import XCTest

final class TwoReposWithNetworkTests: XCTestCase {
final class TwoReposWithInMemoryNetworkTests: XCTestCase {
let network = InMemoryNetwork.shared
var repoOne: Repo!
var repoTwo: Repo!
Expand All @@ -20,7 +15,7 @@ final class TwoReposWithNetworkTests: XCTestCase {
var adapterTwo: InMemoryNetworkEndpoint!

override func setUp() async throws {
await TestTracer.shared.bootstrap(serviceName: "RepoTests")
//await TestTracer.shared.bootstrap(serviceName: "RepoTests")
await withSpan("setUp") { _ in

await withSpan("resetTestNetwork") { _ in
Expand Down Expand Up @@ -70,12 +65,12 @@ final class TwoReposWithNetworkTests: XCTestCase {
}

override func tearDown() async throws {
if let tracer = await TestTracer.shared.tracer {
tracer.forceFlush()
// Testing does NOT have a polite shutdown waiting for a flush to complete, so
// we explicitly give it some extra time here to flush out any spans remaining.
try await Task.sleep(for: .seconds(1))
}
// if let tracer = await TestTracer.shared.tracer {
// tracer.forceFlush()
// // Testing does NOT have a polite shutdown waiting for a flush to complete, so
// // we explicitly give it some extra time here to flush out any spans remaining.
// try await Task.sleep(for: .seconds(1))
// }
}

func testMostBasicRepoStartingPoints() async throws {
Expand Down

0 comments on commit 3f23e76

Please sign in to comment.