On Oct 11, 2012, at 12:00 AM, Sergiu Dumitriu <sergiu(a)xwiki.com> wrote:
On 10/10/2012 12:03 PM, Jerome Velociter wrote:
> On 10/10/2012 04:30 PM, Vincent Massol wrote:
>> Hi Ludovic,
>>
>> On Oct 10, 2012, at 3:39 PM, Ludovic Dubost <ludovic(a)xwiki.com> wrote:
>>
>>> Why would script services be internal ? They should have a stable API
>>> shouldn't they ?
>> Yes, I agree, each Script Service should define an interface and
>> implement it in addition to implementing ScriptService.
>>
>> We've been lazy and we should fix this as otherwise CLIRR won't let us
>> know when we break scripting APIs.
>
> Wouln't it be good to start distinguish between API and SPI, and have a
> different set of CLIRR rules for each type ?
>
> For instance, I don't see a big benefit in not allowing new methods in
> such script services interfaces. In my opinion those are not designed or
> intended to be extended or implemented by third parties anyway.
> So IMO going through a VOTE everytime one adds a new method to a script
> service is too constraining for little value.
>
> My 2 cents
> Jerome
Totally agree.
Yes we can start brainstorming about it. It's a lot of work. We need to define
precisely what we call SPI and what we call API and then define rules for SPI package name
(probably needs "spi" in the package name or api needs to be put in an
"api" package name), need to think about migration from what we have to the
target, etc.
One other thing that bugs me is that a component that implements two roles will have two
instances, and this makes it harder to have a class that implements both ScriptService and
a specific role for that component.
Yes but that's not needed. The script service only needs to implement 1 component
role, the interface doesn't have to be a role.
It is if you want to use it not just from scripts, but from Java as well. I'm talking
mostly about utilities like XMLScriptService which don't expose an internal component
to scripts, but provide their own functionality.