SemanticMediaWiki / SemanticResultFormats

Provides additional visualizations (result formats) for Semantic MediaWiki
https://www.semantic-mediawiki.org/wiki/Extension:Semantic_Result_Formats
Other
45 stars 75 forks source link

Installation incompatibility with Miraheze setup #732

Closed Routhwick closed 1 year ago

Routhwick commented 1 year ago

Setup

Issue

Last month, Miraheze turned down Semantic Result Formats due to incompatibility with their submodule-based approach to installing extensions. When @Universal-Omega attempted to install SRF on Miraheze during the mid-afternoon of September 12, the following backtrace resulted. (Emphasis in UO's commentary bolded.)

Fatal error: Cannot redeclare smwfContLang() (previously declared in /srv/mediawiki/w/extensions/SemanticResultFormats/extensions/SemanticMediaWiki/includes/GlobalFunctions.php:28) in /srv/mediawiki/w/extensions/SemanticMediaWiki/includes/GlobalFunctions.php on line 27

"I believe this is caused by an incompatibility with how composer is needed to be installed for the extension, which is incompatible with our setup of submodules.

"Unfortunately, because of that, that extension can not be done."

A little while later, UO added:

"I may look into adjusting our composer setup eventually to support those other type of extensions, but for now they can not be installed. I apologise for the inconvenience."

After I brought up this Hostinger support page to his attention, he elaborated further

"The submodules way we install extensions mean we can not edit extensions, the way MediaWiki also works, prevents us from modifying the way things load, so in this case, that will not work. The issue is because SMW is installed via submodule, but the extension tries to re-install and include it via composer, which leads to files being double loaded and thus not working."

After nearly a month's delay (due to babysitting + wiki-maintenance commitments et al.), I am making this filing on their behalf, and will send them any received feedback/concerns en route to tentative reconsideration. (I am a user of SMW on Miraheze, and also utilised SRF back when Referata had that as a companion extension.)

TL/DR: Any way to retrofit SRF's code so that Miraheze's submodules can handle it?

JeroenDeDauw commented 1 year ago

Perhaps they can work around the issue by telling Composer that SMW is already installed. That said, installing the dependencies of MediaWiki and extensions independently with Composer is not safe. Composer is supposed to know about all dependencies and only install a single copy of each.