New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API available to SwiftPM Commands is no longer available to other clients of the SwiftPM #7440
Comments
That is correct and is intended. Only stable and versioned API SwiftPM provides is in If you intend to build tools on top of SwiftPM, package and build tool plugins or shelling out to CLI commands are the only supported options right now. SourceKit-LSP is always built with the corresponding SwiftPM source tree with the same snapshot tag, and also doesn't adhere to SemVer. Outside of that specific case SwiftPM should not be used as a library. |
that's an unfortunate and unexpected change of the course. What is the vision of the Doesn't Xcode and Swift Playgrounds use it without shelling out to CLI? (wouldn't that be a bit of an unfair advantage for in-house tools) |
These are closed-source products that are out of scope of the open-source SwiftPM repository. I can't provide any information on that. |
Saying about API digester related types in SwiftPM, those types themself are pretty trivial and the main functionalities are provided by |
as long as that tool does not need to build anything like |
Hmm, you are right. We can still build packages through CLI but cannot easily collect enough build information required to construct I think the main motivation for hiding those APIs is to increase the opportunities to improve the internal architecture, so exposing whole APIs used by So I'd like to understand your specific use cases to have the best interfaces for both SwiftPM maintainers and you. |
Commands
is a primarySwiftPM
product client. Unfortunately, it uses API that recently became scoped as apackage
; therefore, it is no longer accessible to third-party clients of theSwiftPM
product. It makes it impossible to use the same functionality by other clients (without reimplementing it, I guess). That wasn't an issue until recent changes #7387For example, it's now impossible to build a tool similar to the
swift-api-digester
command usingSwiftPM
product as a dependency, as it lacks the API to build the package.I see it as an oversight with a chance to revert and make it public again. Ideally, whatever is used by, e.g.,
Commands
should be a public API available to other clients of the SwiftPM product (library).The text was updated successfully, but these errors were encountered: