Hey all.
In light of recent discussions on this list about using branches and not commit broken code, I'd like to ask for some advice.
Firstly, a little on me. I'm an amateur programmer, and more than a bit rubbish at times (despite PHP being my strongest language). I've submitted a number of patches to Bugzilla, prodded people on IRC, etc. and they've been reviewed and accepted with minor changes. They've all been small, easily readable patches for "paper cut" bugs so far.
More recently, I've been having a prod at some of the page protection code. My goal currently is to make it possible to overlay different editing restrictions e.g. to make it possible to have a temporary "surge" in protection to +sysop without touching the underlying +autoconfirmed. I've been having some success with the basic operations, although it has required an additional pr_id column to be added to page_restrictions and a couple of key changes. Obviously my code would need substantial review when I'm done, particularly to consider the many odd cases that come up when you've got 10 million visitors and not just 1.
So, two questions: * Should I write up my proposed changes for people to comment on? If so, where? How should I publicise it? What sort of things should I mention? * Am I in danger of essentially creating one large patch which then has to be commited all in one go? Should I try to avoid this? How?
Thanks all and apologies for some many questions,
Harry (User:Jarry1250)
1. Write up a proposal somewhere (Eg: in your userspace on wiki then share the link around or post it to the mailing list) 2. Apply for commit access (link to the proposal/patches you have done etc etc, we do have the ability to give access to certain sections of the SVN such as branches without allowing committing to to the main trunk of mediawiki (/phase3/))
Although some people may recommend doing major changes off site (eg: github), I highly recommend against this since most of our devs don't want to have to go offsite to review code changes unless you do it via a Git to SVN gateway system/setup (eg: Brion does this for some work).
On Sun, Jul 31, 2011 at 3:46 AM, K. Peachey p858snake@gmail.com wrote:
- Write up a proposal somewhere (Eg: in your userspace on wiki then
share the link around or post it to the mailing list) 2. Apply for commit access (link to the proposal/patches you have done etc etc, we do have the ability to give access to certain sections of the SVN such as branches without allowing committing to to the main trunk of mediawiki (/phase3/))
Although some people may recommend doing major changes off site (eg: github), I highly recommend against this since most of our devs don't want to have to go offsite to review code changes unless you do it via a Git to SVN gateway system/setup (eg: Brion does this for some work).
I usually do that for self-contained pieces like a new extension -- this can be built in isolation (but in a way that you can share for ongoing review and testing), then pushed over to SVN when it's ready.
It can be a little trickier to do for existing core code that way. (Extensions are also easier to develop straight in SVN, since new ones don't have to be backwards-compatible! It's ok to check it in and have it a little flaky still if it's not yet completed or used.)
Generally speaking the best thing is to start tossing the idea around here on the list (& write up a page on www.mediawiki.org/wiki/RFC); if there's a relevant bugzilla entry, start posting patches there when code's ready to be tested / reviewed. We're trying to find ways to make the communication -> review -> response feedback look more reliable, so feel free to speak up if you're not getting clear directions!
For big changes, usually there's an advantage to splitting it up into smaller pieces. You can then do various parts of the change relatively independently; changing one thing at a time. This can make the code easier to follow for reviewers, but even more importantly makes each change easier to understand *and test*... and in many cases, self-contained stages mean that we can make the actual commits incrementally without breaking backwards-compatbility.
-- brion
K. Peachey wrote:
- Write up a proposal somewhere (Eg: in your userspace on wiki then
share the link around or post it to the mailing list) 2. Apply for commit access (link to the proposal/patches you have done etc etc, we do have the ability to give access to certain sections of the SVN such as branches without allowing committing to to the main trunk of mediawiki (/phase3/))
Although some people may recommend doing major changes off site (eg: github), I highly recommend against this since most of our devs don't want to have to go offsite to review code changes unless you do it via a Git to SVN gateway system/setup (eg: Brion does this for some work).
I agree with the above. We should have some path in /branches for these kind of branches, eg. /branches/pastebin. Then I would be easy to grant access there to some non-core users. I would then copy the files and start working with the proposal (however, you don't need a complete rewrite before gathering feedback).
Hello, I'm trying to update some of my extensions to work with the ResourceLoader in 1.17, and I can't work out how to get jQuery to load. I've tried the example at http://www.mediawiki.org/wiki/ResourceLoader/Migration_guide_for_extension_d...
and tried adding it directly, $out->addModules( array( 'jquery.ui' ) );
But nothing I do will actually get the script to load and become available, can anyone tell me the new syntax to get jQuery there?
Thanks, Aran
Are you aware that jQuery and jQuery UI are two different things?
2011/8/1 Aran Dunkley aran@organicdesign.co.nz
Hello, I'm trying to update some of my extensions to work with the ResourceLoader in 1.17, and I can't work out how to get jQuery to load. I've tried the example at
http://www.mediawiki.org/wiki/ResourceLoader/Migration_guide_for_extension_d...
and tried adding it directly, $out->addModules( array( 'jquery.ui' ) );
But nothing I do will actually get the script to load and become available, can anyone tell me the new syntax to get jQuery there?
Thanks, Aran
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Yes I'm using both jQuery and jQueryUI in some of my extensions and they've broken in MediaWiki 1.17 because neither of them are being loaded any more. I've tried many different variations of using $wgOut->addModules and setting items in $wgResourceModules but no matter what I do I can't seem to get the jQuery scripts to load. The browsers error log just says that the $, jQuery and other functions aren't defined.
On 01/08/11 23:51, Jelle Zijlstra wrote:
Are you aware that jQuery and jQuery UI are two different things?
2011/8/1 Aran Dunkley aran@organicdesign.co.nz
Hello, I'm trying to update some of my extensions to work with the ResourceLoader in 1.17, and I can't work out how to get jQuery to load. I've tried the example at
http://www.mediawiki.org/wiki/ResourceLoader/Migration_guide_for_extension_d...
and tried adding it directly, $out->addModules( array( 'jquery.ui' ) );
But nothing I do will actually get the script to load and become available, can anyone tell me the new syntax to get jQuery there?
Thanks, Aran
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
On Mon, Aug 1, 2011 at 1:55 PM, Aran Dunkley aran@organicdesign.co.nz wrote:
Yes I'm using both jQuery and jQueryUI in some of my extensions and they've broken in MediaWiki 1.17 because neither of them are being loaded any more. I've tried many different variations of using $wgOut->addModules and setting items in $wgResourceModules but no matter what I do I can't seem to get the jQuery scripts to load. The browsers error log just says that the $, jQuery and other functions aren't defined.
That's very strange. jQuery should definitely be there, otherwise something is very wrong. I wouldn't know how to debug this without more information. Is the JavaScript console reporting any JS errors?
Roan Kattouw (Catrope)
I've figured it out now thanks :) the problem was that my scripts had things running inline that needed to be deferred until after the JS modules had loaded.
On 02/08/11 18:10, Roan Kattouw wrote:
On Mon, Aug 1, 2011 at 1:55 PM, Aran Dunkley aran@organicdesign.co.nz wrote:
Yes I'm using both jQuery and jQueryUI in some of my extensions and they've broken in MediaWiki 1.17 because neither of them are being loaded any more. I've tried many different variations of using $wgOut->addModules and setting items in $wgResourceModules but no matter what I do I can't seem to get the jQuery scripts to load. The browsers error log just says that the $, jQuery and other functions aren't defined.
That's very strange. jQuery should definitely be there, otherwise something is very wrong. I wouldn't know how to debug this without more information. Is the JavaScript console reporting any JS errors?
Roan Kattouw (Catrope)
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
wikitech-l@lists.wikimedia.org