Page MenuHomePhabricator

Librarize ChangeOp
Open, LowPublic

Description

Motivation
ChangeOp interface is used in Wikibase, WikibaseLexeme and possible is or will be used in other extensions that build on Wikibase.

On one occasion (possible some others before it, or after it), we faced a little difficulty in introducing a change in ChangeOp interface (https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/518721/6/docs/adr/0004-add-apply-state-to-changeop.md#153).

That difficulty comes mainly from the fact that Wikibase and WikibaseLexeme are always kept fully compliant in their upstream branches, and CI pipeline for Wikibase runs WikibaseLexeme tests to ensure that.

Suggested improvement
The big and great improvement in general if we could make WikibaseLexeme (and other Wikibase extensions) depend on versioned Wikibase rather than on upstream master branch. But that's a rabbit-hole that cannot be tackled at once.

The easier solution for ChangeOp case (which will make an example for other similar cases as well) is to instead extract ChangeOp and related interfaces into a separate library that has a usual versioning/releasing that extensions then can depend on and use.

Event Timeline

We probably do not want to block the work on edits summaries T220696 until this is done. So for now, would probably wait on this, and change ChangeOp interface while it is in Wikibase first and then come back to this at a later point.