API change: make Trigger.run() public

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

API change: make Trigger.run() public

Jean-Baptiste Quenot
See http://www.nabble.com/New-approach-for-SCM-polling-tf4414159.html#a12591536
for background information about this change.

I'm  polling the  developers  to know  if it's  OK  to change  the
visibility  of Trigger.run()  from protected  to public.   I don't
know how many  plugins implement a Trigger, but I  want to be sure
I'm not messing up before committing the work.

When compiling the whole Hudson project including plugins and all,
I get a BUILD SUCCESSFUL.  So if no one objects, I'll commit the
change.

Thanks,
--
     Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: API change: make Trigger.run() public

Kohsuke Kawaguchi
Administrator
Jean-Baptiste Quenot wrote:

> See http://www.nabble.com/New-approach-for-SCM-polling-tf4414159.html#a12591536
> for background information about this change.
>
> I'm  polling the  developers  to know  if it's  OK  to change  the
> visibility  of Trigger.run()  from protected  to public.   I don't
> know how many  plugins implement a Trigger, but I  want to be sure
> I'm not messing up before committing the work.
>
> When compiling the whole Hudson project including plugins and all,
> I get a BUILD SUCCESSFUL.  So if no one objects, I'll commit the
> change.
I'm afraid the problem with this is that when people update Hudson but
not plugins, this will break plugins.

It's uglier, but I think it's safer to define a separate public method, like

   /**
    * Provides public access to {@link #run()}.
    */
   public final void execute() {
     run();
   }

--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: API change: make Trigger.run() public

Kohsuke Kawaguchi
Administrator
Kohsuke Kawaguchi wrote:

> Jean-Baptiste Quenot wrote:
>> See http://www.nabble.com/New-approach-for-SCM-polling-tf4414159.html#a12591536
>> for background information about this change.
>>
>> I'm  polling the  developers  to know  if it's  OK  to change  the
>> visibility  of Trigger.run()  from protected  to public.   I don't
>> know how many  plugins implement a Trigger, but I  want to be sure
>> I'm not messing up before committing the work.
>>
>> When compiling the whole Hudson project including plugins and all,
>> I get a BUILD SUCCESSFUL.  So if no one objects, I'll commit the
>> change.
>
> I'm afraid the problem with this is that when people update Hudson but
> not plugins, this will break plugins.
>
> It's uglier, but I think it's safer to define a separate public method, like
>
>    /**
>     * Provides public access to {@link #run()}.
>     */
>    public final void execute() {
>      run();
>    }
Oh well, it seems like I was too late, and I've already shipped 1.137.
It looks like there's only one plugin affected (maven1-snapshot-plugin),
so shouldn't be too big a deal.

--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: API change: make Trigger.run() public

Jean-Baptiste Quenot
* Kohsuke Kawaguchi:

> Oh  well,  it seems  like  I  was  too  late, and  I've  already
> shipped 1.137. It  looks like  there's only one  plugin affected
> (maven1-snapshot-plugin), so shouldn't be too big a deal.

That's strange,  I didn't  notice any  failure when  building this
plugin.
--
     Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]