Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 363295

Summary: [Gogo] The class loading commands should be provided to gogo using the speced service properties
Product: [RT] Virgo Reporter: Glyn Normington <glyn.normington>
Component: runtimeAssignee: Glyn Normington <glyn.normington>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: b.kapukaranov, eclipse, hsiliev, l.kirchev
Version: unspecifiedFlags: glyn.normington: documentation+
hsiliev: review+
Target Milestone: 3.5.0.RELEASE   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Bug Depends on: 350853    
Bug Blocks:    

Description Glyn Normington CLA 2011-11-09 07:18:43 EST
This should follow the pattern established in implementing bug 350853.

The Gogo "scope" name for the class loading commands needs to be agreed. "cl" seems reasonable. Then the fully-qualified command invocations under Gogo will be:

> cl:clhas ...
> cl:clexport ...
> cl:clLoad ...

Another alternative is to omit the leading cl from the command names:

> cl:has ...
> cl:export ...
> cl:load ...

but this increases the risk of clashes with commands in other scopes in the future.
Comment 1 Glyn Normington CLA 2011-11-10 09:43:14 EST
Given these commands are specific to Virgo, another alternative is to reuse the vsh scope:

> vsh:clhas ...
> vsh:clexport ...
> vsh:clLoad ...

I prefer this. Any objections?
Comment 2 Hristo Iliev CLA 2011-11-10 09:57:22 EST
I vote for keeping the old names - this will save some work on our side
(documentation, faq), the users won't need to learn the new names and last but
not least we will avoid clashes with existing commands (as you already
mentioned).

If we put the cl* commands in a new bundle one can easily embed them in arbitrary Equinox based project.
Comment 3 Glyn Normington CLA 2011-11-10 10:11:28 EST
Yes, I agree we should keep the old names. Shall we use the vsh scope as per comment 1?
Comment 4 Lazar Kirchev CLA 2011-11-10 10:13:20 EST
(In reply to comment #3)
> Yes, I agree we should keep the old names. Shall we use the vsh scope as per
> comment 1?

As there should be a scope, I think vsh is an appropriate choice.
Comment 5 Hristo Iliev CLA 2011-11-10 10:32:26 EST
I would still prefer to separate class loading commands from vsh and this will allow other projects to use the bundle without additional dependencies. This should be relatively easy since cl* use just Equinox APIs. 

Do you think we should go this way?
Comment 6 Glyn Normington CLA 2011-11-10 10:42:04 EST
(In reply to comment #5)
> I would still prefer to separate class loading commands from vsh and this will
> allow other projects to use the bundle without additional dependencies. This
> should be relatively easy since cl* use just Equinox APIs. 
> 
> Do you think we should go this way?

The vsh scope I am proposing is simply specified as a service property, so it can easily be changed if the bundle is reused in other contexts. However, the bundle cannot currently be reused "as is" because it depends on the Virgo shell bundle which then depends on other parts of Virgo, etc.

We *could* factor out the class loading commands into their own bundle so that the bundle could be reused "as is" in other environments, but in that case it would be better to move the bundle into Equinox and then reuse it in Virgo.

For now, I suggest we go with the vsh scope for clarity (i.e. it's then clear the commands come from Virgo) and change to another scope name if/when the class loading commands are moved to Equinox.

How does that sound?
Comment 7 Hristo Iliev CLA 2011-11-10 10:46:42 EST
You are right - the correct place for cl* commands would be Equinox itself if we want reuse.

The vsh scope sound reasonable in this light :)
Comment 8 Glyn Normington CLA 2011-11-18 10:09:22 EST
Kernel commits: 8dbc81dbb63082461be3d25f4a7cf52f18766157, 5ba0bb957a24446935a617b21cbb4768351ee691, and 62458f04179b7b8d606075374449b82a87b0c948.

Documentation commit: 96c2532de47aa14e3eeb108f6e601a475719b3b2.
Comment 9 Glyn Normington CLA 2011-11-18 10:54:11 EST
Closing following Hristo's review, for which I am grateful.