They are being depend on a lot (basically everywhere) but their dependencies are the same. Since this is in lib, the improvement will be pretty big.
|mediawiki/extensions/Wikibase : master||Drop getLocationAgnosticMwApi|
|mediawiki/extensions/WikibaseLexeme : master||Drop getLocationAgnosticMwApi|
|mediawiki/extensions/WikibaseMediaInfo : master||Use wikibase.api.RepoApi instead of getLocationAgnosticMwApi|
|mediawiki/extensions/Wikibase : master||Add getLocationAgnosticMwApi to wikibase.api.RepoApi|
I was using this RL and it just got disappear and broke gadgets that use it.
This breaks again wikidata usage, after "wikibase.client.getMwApiForRepo" was removed not long ago.
For the next refactor - I suggest to first defined the end goal - so all gadgets can adapt to it and properly announce it.
I understand this might be frustrating but there are some points to consider:
- you should avoid depending on the wikibase frontend code (according to public interface policy, they are considered unstable and prone to change at any time without prior warning). You should depend on hooks instead and if the hook for what you want doesn't exist, make a ticket and we address it.
- These changes are important for performance on network level (just this ticket, drops 30 GB/day. TBs for users every month). Cleaner RL modules makes the code more understandable to outside users (and provide tighter encapsulation) and even it reduces the time to load every item in wikidata (I estimate it will be between half a second to a second in total in every page view).
- I understand the request for providing end results beforehand but the problem with this enormous codebase is that it was impossible to get end results (or goals) when we started. The dependency graph of the modules when we started was this:
(click on it to see, 4MB)
It was so complicated that we ended up writing graph analysis tools to find dead modules, unused modules, "entry point" modules or modules that can be merged. We continue to make it better but the graph is slightly cleaner now but we still try to merge a module and we end up not doing it.
Thanks Amir for the explanation. I understand the reason for refactoring the Wikibase modules, and this is good direction in general.
I just ask for a stable way to access wikibase so it won't break every few weeks, and hooks aren't solution for wikibase clients. I opened a separate task T235913 to avoid off topic discussion here.