Hi Everyone,
We provide an interface for the Scribunto extension (Lua modules) in Wikibase for quite some time now. Our integration with Scribunto was very basic initially and not future proof enough for things like arbitrary access or very big items.
Due to that we at some point deprecated the old Lua function to access entities mw.wikibase.getEntity[0] in favor of mw.wikibase.getEntityObject[1] which is much more than just a plain Lua table and allowed us to introduce various convenience functions and to improve performance. We plan to extend on that in the near future to make arbitrary access possible, especially from a performance point of view.
As that's not possible with the legacy mw.wikibase.getEntity function it would be nice if you could replace all of your usages of that function with the new function. Migrating shouldn't be hard, but there are two breaking changes between the output format of the two functions which you need to be aware of and potentially adopt your modules to.
First of all the old entity format, as obtained from mw.wikibase.getEntity, includes all claims twice once with upper and once with lower case keys (so both "P123" and "p123" are present as keys). That has been removed in the new format in favor of just upper case keys ("P123").
The other breaking change is that in the new entity format the Lua tables are no longer numbered from 0 on, but from 1 on (which is the native Lua table enumeration).
You can find a list of all Lua modules (potentially) using the old function sorted by number of transclusions on https://phabricator.wikimedia.org/P272.
Cheers,
Marius
[0]: https://www.mediawiki.org/wiki/Extension:Wikibase_Client/Lua#mw.wikibase.get... [1]: https://www.mediawiki.org/wiki/Extension:Wikibase_Client/Lua#mw.wikibase.get...