apple / swift-distributed-tracing

Instrumentation library for Swift server applications
https://swiftpackageindex.com/apple/swift-distributed-tracing/main/documentation/tracing
Apache License 2.0
224 stars 34 forks source link

Explicitly declare the ServiceContext dependency #147

Closed sidepelican closed 4 months ago

sidepelican commented 5 months ago

In my project, every first clean build causes the next error.

/my_project/.build/checkouts/swift-distributed-tracing/Sources/Tracing/InstrumentationSystem+Tracing.swift:15:19: error: missing required module 'ServiceContextModule'
@_exported import Instrumentation

and this error does not appear when retrying the build. In practice, this is caused by an implicit dependency through another target and the use of @_exported, so we need to declare the dependency explicitly.

# swift --version
Swift version 5.10 (swift-5.10-RELEASE)
Target: aarch64-unknown-linux-gnu
ktoso commented 4 months ago

@swift-server-bot test this please

ktoso commented 4 months ago

Thanks, lgtm!