Last modified: 2014-02-26 12:53:20 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T47865, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 45865 - Enhance EventLogging Schema diffs with Extension:Diff
Enhance EventLogging Schema diffs with Extension:Diff
Status: NEW
Product: Analytics
Classification: Unclassified
EventLogging (Other open bugs)
unspecified
All All
: High enhancement
: ---
Assigned To: Nobody - You can work on this!
:
Depends on: 45869
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-07 22:15 UTC by Sam Reed (reedy)
Modified: 2014-02-26 12:53 UTC (History)
8 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Sam Reed (reedy) 2013-03-07 22:15:50 UTC
As part of the Wikidata project, Jeoren De Dauw wrote an extension to prettify diffing of Javascript. It'd likely be a good addition for EventLogging to have too!

Logging as a TODO item after discussing with Ori

https://www.mediawiki.org/wiki/Extension:Diff

Example: https://www.wikidata.org/w/index.php?title=Q5589038&diff=8314580&oldid=8314578
Comment 1 Jeroen De Dauw 2013-03-08 11:26:43 UTC
> Jeoren De Dauw wrote an extension to prettify diffing of Javascript.


Not sure who this Jeoren fellow is, though if his extension is doing something similar to mine, it is not aimed at JS at all. Diff is aimed at computing and representing differences between JSON like arrays. Please see the documentation and examples.

https://www.mediawiki.org/wiki/Extension:Diff
Comment 2 Matthew Flaschen 2013-03-08 11:29:04 UTC
And JSON is exactly what EventLogging uses.  See https://meta.wikimedia.org/wiki/Schema:GuidedTour?action=edit .  The mention of JavaScript in the initial report is incorrect.
Comment 3 Jeroen De Dauw 2013-03-08 11:35:53 UTC
Ah... yeah, if you translate that into PHP arrays you can feed it to Diff. ATM Diff does not care about ordering, which I suspect is something you actually do care about here.
Comment 4 Matthew Flaschen 2013-03-08 11:50:20 UTC
Meaning non-associative arrays are treated as sets?

I actually can't think of a case where that would currently cause a problem in EventLogging (the main use case is enums, where it just matters whether it's in the array).

However, it could in the future.  Perhaps we can add a OrderedListDiffer for such cases, or rename ListDiffer to SetDiffer (depending how much backwards-compatibility is an issue)?
Comment 5 Jeroen De Dauw 2013-03-08 12:04:12 UTC
ListDiffer does not care about order. It can behave as array_diff does, in which case you get behaviour probably not wanted for non-sets. It's default behaviour however holds into account that an element can occur more then once. So that's not a problem. All I'm saying is that if you need ordering, additions will need to be made.

> or rename ListDiffer to SetDiffer (depending how much
> backwards-compatibility is an issue)?

This rename would be incorrect. And it would break compatibility. This extension has also been designed with the open closed principle in mind. You ought to be able to add new functionality without significantly poking at existing code.
Comment 6 Sam Reed (reedy) 2013-03-08 17:06:58 UTC
(In reply to comment #0)
> As part of the Wikidata project, Jeoren De Dauw wrote an extension to
> prettify
> diffing of Javascript. It'd likely be a good addition for EventLogging to
> have
> too!

Close enough! ;)
Comment 7 Andre Klapper 2014-02-26 12:53:20 UTC
[moving from MediaWiki extensions to Analytics product - see bug 61946]

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links