-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Hide more llbuild-specific APIs #7387
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
Conversation
This APIs should not be marked `public` to prevent SwiftPM clients from adopting those by accident.
@swift-ci test |
Sources/Build/BuildDescription/SwiftTargetBuildDescription.swift
Outdated
Show resolved
Hide resolved
@swift-ci test |
I'd just like to say thanks for going through the work of minifying the SwiftPM api surface, this makes it much easier to make changes without breaking clients |
@swift-ci test |
@swift-ci test windows |
@MaxDesiatov What is the replacement API to make builds now? I use Now, only SPM can use that API and that doesn't seem fair to me. what am I missing here? |
There is no replacement API outside of Build system internals is an unversioned implementation detail, which can and will be changed without notice. Removing Keeping them |
that is not true. It was never "freezed" by any means. It is actively used by the CLI client and could be used by third-party clients. Now that is no longer possible 😢 |
SwiftPM CLI client is maintained in this same repository and can be changed in lockstep in the same PR. We would be notified by CI job failures and could fix it immediately if anything breaks on that front. SourceKit-LSP breakages are also exposed by SwiftPM CI jobs in PR testing and must be resolved before a PR is merged. This is not the case for external clients. There's no compatibility suite for those and no versioning of what became a public API by accident or because the language didn't allow us to keep it private at the time when it was developed. |
it is as it should be. I don't see a clear reason to shut down the API completly for other clients. On the contrary, if API is good enough for CLI, it's good enough for third-party clients. Since API is not stable (which is ok) it's ok to change it without providing backward compatibility. I don't find that a trouble nor unusual - I understand how it is convenient for the SwiftPM project needs itself, but the value in keep the API open (the way I see it) can be only beneficial for SwiftPM adoption outside Apple.
Maybe swift SPI mechanism is better suited for that after all. |
I think I've provided enough reasons in this PR and the linked issue, I don't see a point in going in circles and rehashing those again.
I don't see how this conjecture is made. Needs, requirements, and expectations of CLI maintained in the same package as other SwiftPM internals, as opposed to third-party clients, are significantly different. An internal SPI good enough for CLI maintained in the same package is almost always not good enough for third-party clients, as the latter require stability, versioning, and a commitment of continued maintenance of those public APIs.
Which is what happened in this PR: an unstable API (that was not meant to be
This specific point in isolation is correct. I'm considering what still remains |
disagree. sourcekit-lsp relies on that unstable API, and stability is not a requirement. that's my whole point. API does not have to be stable unless declared as such, which then sets an expectation. I don't think the remaining public API is stable, too anyway. |
I'll reiterate again that SourceKit-LSP case is different as it is always built in lockstep with SwiftPM. For it API stability is not a requirement because it can't be broken for it, we literally can't merge a SwiftPM PR that breaks SourceKit-LSP, required CI jobs won't pass in that case. This is not the case for other clients. |
I'll reiterate again that this is an artificial requirement you put on that. As an "other clients" representative, I can assure you that's not an issue for me, and I accept the consequences of an unstable API |
These APIs should not be marked `public` to prevent SwiftPM clients from adopting them by accident.
These APIs should not be marked `public` to prevent SwiftPM clients from adopting them by accident.
This reverts commit 5185c03.
This reverts commit 5185c03.
These APIs should not be marked
public
to prevent SwiftPM clients from adopting them by accident.