Skip to content

Add public API to query a target's runnable path #286

@jakepetroules

Description

@jakepetroules

swift-run will use this to locate the path to the executable to launch.

(see https://github.com/swiftlang/swift-package-manager/pull/8331/files#r1990110132)

Suggested starting point: SWBBuildServiceSession could get an API like func generateRunnableInfo(for request: SWBBuildRequest, targetID: String, delegate: any SWBPlanningOperationDelegate) async throws -> SWBRunnableInfo which returns a struct containing path information for the specified target.

Or, this could be emitted as a new SwiftBuildMessage event that could contain the path information since the build process already has to produce it as a side effect. ReportPathMapInfo is a similar kind of thing that already exists; we could have a ReportRunnableInfo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions