Page MenuHomePhabricator

Lua module broken because of incompatibility between SerializerFactory and EntitySerializer
Closed, ResolvedPublic


SerializerFactory::newSerializerForObject optionally takes a SerializationOptions object. EntitySerializer however requires an EntitySerializerObject.

Scribunto_LuaWikibaseLibrary calls newSerializerForObject with no options set, which causes a fatal error when trying to instantiate an EntitySerializer.

The issue however is more general: If SerializerFactory takes a generic options object, but some of the serializers require a specialized options object, the caller of the factory function would have to know in advance what kind of object will be constructed.

In fact, any knowledge about the needs and requirements of any of the objects the factory may create essentially renders the factory pointless. For the factory to be useful, it must only request very generic information from the caller.

Version: unspecified
Severity: blocker



Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:41 AM
bzimport set Reference to bz49878.
bzimport added a subscriber: Unknown Object (MLST). (Gerrit Change I4762ad35a43cc2d6e3b8efae75762bcb782e33e2) | change APPROVED and MERGED [by jenkins-bot]

Verified Wikidata demo sprint 22-9