opentelemetry-swift icon indicating copy to clipboard operation
opentelemetry-swift copied to clipboard

Explicit `static` library types causes duplication of library code

Open ganeshnj opened this issue 1 year ago • 1 comments

All libraries shipped in the repo currently explicitly defaults to static linking which means every target that depends on them will have the library included. This can lead to duplicate libraries. For example

app
|
package b
|       |
|       OpenTelemetryApi
|
package a
|
OpenTelemetryApi

A customer can workaround this by simplifying the dependency graph such as

app
|
package b
|
package a
|
OpenTelemetryApi

but this only works if the customer has control over every package in the dependency graph.

I know SPM had issues with linking in the past but I believe they are fixed now and we should not explicitly define how libraries should be linked in the target but let SPM handle it.

ganeshnj avatar Jun 18 '24 08:06 ganeshnj

running into the same issue. is there any update on this?

n-ravichandran avatar Aug 02 '24 15:08 n-ravichandran