I propose removing the implicit dependency on SwiftPM
from the LanguageServerProtocol
model in the project setup.
Even though LanguageServerProtocol
is separated as a module today, it's still in the same package with other modules, like SourceKitLSP
, meaning that when linking a LanguageServerProtocol
module (which is nothing more than the LSP model ), SwiftPM tool fetches all the package dependencies (including those not used). That SwiftPM
package dependency is fetched and included when solving dependencies, even tho unused, makes impossible to use a different version of SwiftPM package by the consumer package.
Example: Package A uses the module LanguageServerProtocol, but also depend on SwiftPM package from specific branch release/5.9
(or any other version). Because sourcekit-lsp
package depends on SwiftPM on main
branch, it is impossible to resolve the dependencies due to a conflict on the SwiftPM
package versions (with an error message "... is required using two different revision-based requirements (release/5.9 and main), which is not supported").
I propose separate LanguageServerProtocol
and LanguageServerProtocolJSONRPC
to a separate package, apple/language-server-protocol and use it as a dependency for apple/sourcekit-lsp package. This way other packages can use LanguageServerProtocol without SwiftPM dependency (that itself bring many more dependencies to the plate).
thoughts? is it possible?