ItamarWMDE added a comment.
In T256054#6302406 <https://phabricator.wikimedia.org/T256054#6302406>, @Ladsgroup wrote: > The above patch is the last thing I can do to make it decoupled without weird gymnastics, there are five more that I don't know if there's a way to decouple them properly: > > - `mw.config.values.wbSiteDetails`: Build using php code living in lib, heavily used in both client and repo: https://codesearch.wmflabs.org/search/?q=wbSiteDetails&i=nope&files=&repos= > - We might split the php file into two and copy them? > - `mw.config.values.wbRepo`: Same, heavily used everywhere. As they both rely on php code, it seems like the easier option, but there's probably more digging around to do here. > - `wikibase` basic nonsense code that defines wikibase global object which is used everywhere. The fact that it's nonsensical global var bootstrapping means we can probably safely duplicate this file to client. as long as the sub-namespaces are available: `wikibase.sites` <-- Defined in WikibaseLib `wikibase.api` <-- Defined in WikibaseLib > - `wikibase.api.RepoApi`: both client and repo depend on it and the obvious solution is to copy-paste it in both places but all of the code lives in a git submodule. > - Have two identical submodule? > - Don't give a damn and define it twice while both pointing to the same file, how is it different from status quo? IMHO this is a perfect candidate for a JS module to test the monorepo approach with. > - `wikibase.Site` defined dynamically through a hook in lib. Fun. > - Copy the hook handler and the code? I don't think it is necessary to copy the code, shouldn't we follow ADR 13 in this case and just define the hook both in `extension-repo.json` and `extension-client.json`? TASK DETAIL https://phabricator.wikimedia.org/T256054 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Ladsgroup, ItamarWMDE Cc: WMDE-leszek, Ladsgroup, Tarrow, Lucas_Werkmeister_WMDE, Aklapper, ItamarWMDE, Alter-paule, Hazizibinmahdi, Beast1978, Un1tY, Akuckartz, Hook696, darthmon_wmde, Kent7301, joker88john, CucyNoiD, Nandana, Gaboe420, Giuliamocci, Cpaulf30, Lahi, Gq86, Af420, Bsandipan, GoranSMilovanovic, QZanden, LawExplorer, Lewizho99, Maathavan, _jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, Lydia_Pintscher, Mbch331
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs