Page MenuHomePhabricator

move from forked copies of upstream files to some extension mechanism
Closed, ResolvedPublic

Description

Move from forks of upstream source code files to some extension mechanism. (Fork means here a copy of the file with a slight modification that needs to be synced again when it changes upstream.) This requires that such a mechanism be created upstream first.

Event Timeline

JanZerebecki raised the priority of this task from to Needs Triage.
JanZerebecki updated the task description. (Show Details)
JanZerebecki moved this task to Backlog on the Phabricator-Sprint-Extension board.
JanZerebecki subscribed.

This is a good idea. There are currently 5 classes (for the boards) that are basically unmodified upstream code that dwell in the Sprint context. These serve the following routes:

'board/(?P<projectID>[1-9]\d*)/' => array(
    'edit/(?:(?P<id>\d+)/)?'
    => 'SprintBoardColumnEditController',
    'hide/(?:(?P<id>\d+)/)?'
    => 'SprintBoardColumnHideController',
    'column/(?:(?P<id>\d+)/)?'
    => 'SprintBoardColumnDetailController',
    'import/'
    => 'SprintBoardImportController',
    'reorder/'
    => 'SprintBoardReorderController',
),

I would be nice to not have to maintain these classes. However, they all need to extend SprintBoardController which is the only change needed, and is why they are named differently. So really, they are not "forked" directly. In fact, there is nothing in Sprint that is a direct copy of upstream code.

How can you change the file without copying it?

Because as far as I can see there is nothing to be reported upstream, as this is all work for the Sprint extension. If this reasoning is not correct, just bring the project back.

@JanZerebecki to clarify "copy" in this sense means an exact replica. Of course these files were duplicated (i.e copied) originally, but then modified slightly.

@Qgil providing the extension mechanism needs to happen upstream then the Sprint extension can use that to avoid having copied files with changes, so I added the project back. It is probably best if @Christopher took this upstream instead of someone else because he knows best what is needed for this to work.

Discussing an extension mechanism for Phabricator also needs to happen upstream, then.

The forked controllers have been extracted from the sprint extension in this commit https://gerrit.wikimedia.org/r/#/c/270484/, so this task can be closed.

Yay, deleting code: +641, -3913 Thx.