Repository navigation
Description
Currently Phpactor packages are, ideally, divided according to package design principles, for example:
phpactor/reference-finder: policy for modelsphpactor/reference-finder-extension: Phpactor extension for reference finder (provide collectors and provide chain implementations)phpactor/reference-finder-rpc: integrate the reference finder with Phpactor RPCphpactor/reference-finder-language-server: integrate the reference finder with Phpactor Language Serverphpactor/reference-finder-worse-reflection: implementation of policyphpactor/reference-finder-worse-reflection-extension: provide tagged implementations of the policy
This provides a perfect separation of concerns, but makes it difficult to maintain and contribute to.
We can improve this by combining extensions with implementations/policy, e.g.
phpactor/reference-finder: policy and extensionphpactor/reference-finder-rpc: handlers and extensionphpactor/reference-finder-language-server: handlers and extensionphpactor/reference-finder-worse-reflection: implementation of policy and extension
Possibly we can also combine the rpc and language-server packages in reference-finder and going further - err, we can put everything in reference-finder.
The same could be applied to f.e. completion.
The downside is that you either get "optional" dependencies (code in the package is implicitly depdendent on external code without a version constraint) or you bundle unrequired depdencies (e.g. include reference-finder and get a language server free even though you only use RPC).
Currently, the chances of anybody using any of these packages in isolation is minimal, and I wouldn't encourage it. At the same time having individual packages provides a good separation of concerns. But the cost of maintainence is unacceptable (too much mental overhead, lack of tooling, waiting for composer to update, inter-package dependency management).
So at least initially, a reasonable first step would be to combine extensions with implementation/policy packages and not have "standalone" extensions - it probably needs some more thought, but it can probably half the number of packages in some domains.
Activity
[-]Packages: Combine Phpactor integrations in implementation pacakges[/-][+]Compound packages[/+]camilledejoye commentedon Mar 14, 2020
I like this one more but it's still a lot of packages.
So we could try one package but with clear directory structure:
So we benefit from having only one package but still keeping a clear separation so if it was a bad idea it will be really easy to split it into independent packages ?
dantleech commentedon Mar 14, 2020
Problem is that we then pull in a huge number of dependencies and I think increase risk of cross-package contamination.
Merging implementation extensions into implementation packages is still keeping strong separation between policy and implementation - it's also easier.
mamazu commentedon Mar 17, 2024
This could probably be closed as those packages have all been merged into the core. Right?