Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Mediawiki

Linker and backward compatibility for extensions

 

 

Wikipedia mediawiki RSS feed   Index | Next | Previous | View Threaded


jimhu at tamu

Apr 20, 2012, 8:13 AM

Post #1 of 2 (251 views)
Permalink
Linker and backward compatibility for extensions

We have some extensions that used the deprecated linking methods from skin objects. I've changed these to use Linker::LinkKnown for 1.18+, but now they don't work with 1.17 or below. Is there a recommended code practice that works for both?

Thanks.
=====================================
Jim Hu
Professor
Dept. of Biochemistry and Biophysics
2128 TAMU
Texas A&M Univ.
College Station, TX 77843-2128
979-862-4054


_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


krinklemail at gmail

Apr 20, 2012, 9:03 AM

Post #2 of 2 (239 views)
Permalink
Re: Linker and backward compatibility for extensions [In reply to]

The easiest/practical solution I think is branching. That keeps the code clean
and saves time by not having to continuously test the extension against all
versions you want to support.

If your extension was/is hosted in Wikimedia SVN, then users of MediaWiki 1.17
can simply select the "1.17" option in the downloader which is the branched
version of the extension as it was when 1.17 was being developed. In that
version your extension would still have the old method calls to Skin which work
fine with 1.17.

If your extension is hosted by yourself or elsewhere, you can do similar thing.
Create an "mw-1.17" branch of your extension from the commit that last worked
with 1.17 (or just the commit that was active when 1.17 was developed). And
instruct users to download the branch instead of trunk if they run an older
version of MediaWiki.

Extension:SyntaxHighlight_GeSHi [1] for example, has branches going back to 1.10
(!). Click "Download snapshot" and you'll see a dropdown menu. Those old
versions are not maintained or supported, they are provided as a fixed moment in
time for users of any mediawiki version. So those old version will not have the
latest new features. But, contrary to tags, if a bug fix has to be backported,
it can still be committed to that branch just fine.

Depending on what you want, this could mean double maintenance, however in most
cases one doesn't backport new functionality to an old version. Instead you
develop in "trunk", and whenever a new MediaWiki release is started, you create
a branch for the (then old) mediawiki version, and then continue to work on
trunk again for the current MediaWiki release.


-- Krinkle

[1] https://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi

On Apr 20, 2012, at 5:13 PM, Jim Hu wrote:

> We have some extensions that used the deprecated linking methods from skin objects. I've changed these to use Linker::LinkKnown for 1.18+, but now they don't work with 1.17 or below. Is there a recommended code practice that works for both?
>
> Thanks.
> =====================================
> Jim Hu
> Professor
> Dept. of Biochemistry and Biophysics
> 2128 TAMU
> Texas A&M Univ.
> College Station, TX 77843-2128
> 979-862-4054
>
>
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l [at] lists
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Wikipedia mediawiki RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.