Best way to expose ObservabilityScope?

When diagnostics were refactored, ObservabilityScope became necessary in order to do almost anything, but it is located in the Basics module, which is not formally a part of any of the library products. For now it is certain to be present and importable, but that is only because SwiftPM currently allows transitive dependencies to leak through to higher levels.

I would like to submit a pull request to rectify it, but there are two options and I would like to know which the team would prefer:

  • Narrow solution: Add @_exported import class Basics.ObservabilityScope to Workspace.
  • Broad solution: Add Basics to SwiftPMDataModel(-auto) and SwiftPM(-auto).

@abertelrud @NeoNacho @tomerd

1 Like

I think the narrow solution is preferable, we probably don't want most of Basics to become part of libSwiftPM's public API.