hoo added a comment.

I think a good way to go about this tracking would be by overriding the Lua direct access method for the table that represents the entity.

This can be done via an “__index” metamethod that would log statement usage (see this example of tracking: https://www.lua.org/pil/13.4.4.html). A “loggingtable” proxy object would access/track the actual object/table containing the entity. This should be a small change in modules using Wikidata.

This is very similar to what I already proposed in T76156: [Story] mw.wikibase: Use __index to lazy load entity contents, although mostly for performance reasons there.


TASK DETAIL
https://phabricator.wikimedia.org/T151717

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: hoo
Cc: TomT0m, Hall1467, hoo, zhuyifei1999, Eloquence, Lydia_Pintscher, Sannita, Ainali, Liuxinyu970226, MZMcBride, Ricordisamoa, Micru, jayvdb, Daniel_Mietchen, Tobi_WMDE_SW, Legoktm, Abraham, Wikidata-bugs, liangent, jeremyb, aude, Candalua, Bianjiang, Aklapper, DixonD, daniel, D3r1ck01, Izno, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to