I wonder if it’s possible to control extension dependencies…
Consider this scenario that I’ve stumbled upon.
Package A exists and has some deps. It’s one of those packages that both defines an interface and provides various implementations of it. Those implementation have dependencies for their work, namely things like HTTP 1.
Now I’m writing package B. It’s mostly done, and I want to write an extension for A implementing the interface of B, lets call the extension ABExt. A doesn’t require HTTP so I wouldn’t like to add those to the list of A’s deps. However the extension ABExt does depend on HTTP. As it currently is there’s no problem because I know that A depends on HTTP therefore if A is loaded, then HTTP will be available and therefore ABExt can just import them and everything will work.
The problem is that this is just incidental and possibly temporary. Maybe in the future A will bump HTTP dep to 2. Then ABExt will try and import HTTP (1) and will get HTTP 2 and it will be broken. The core of the problem of the approach of “if A is loaded then HTTP is available” is that there’s nothing explicitly enforcing this statement to remain true.
I’d like to hear thoughts on how to approach this.