[Glass] Questions about Rowan 3
Dale Henrichs
dale.henrichs at gemtalksystems.com
Wed Nov 27 16:54:15 PST 2024
Hello Patrik,
More good questions my answers are inlined..
On Fri, Nov 22, 2024 at 4:30 AM Patrik Svestka via Glass <
glass at lists.gemtalksystems.com> wrote:
> ...
> Are there any examples/overview how does Rowan (1 -> 2 -> 3) improve on
> its predecessor Metacello or among its own versions? It would be nice
> to see, on some examples,
>
Metacello solved a big problem but there were flaws with using a package
load order algorithm in a multi-project system:
- In a large multi-project (BaselineOf) image, package load order loops
were inevitable and difficult to detect and even more difficult to resolve.
- The relationships between projects was specified in terms of a package
in another BaselineOf... which meant that for every package in a BaselineOf
there needed to be a valid load order that would result in a functioning
set of classes.
When Rowan was conceived, we planned on sticking with the tonel/filetree
format for packages and replacing the BaselineOf with a set of object-based
load component structures. A load component is a specification of the
supported entry points into a system. In Metacello any package in a project
was fair game for loading, in Rowan, the project owner explicitly defines
the supported entry points into a project by using load components ... so
yes multiple load components may be specified.
Here is an example of a load component[1] from an example project[2]:
RwLoadComponent {
#name : 'Core',
#projectNames : [ ],
#componentNames : [
'tests/Tests'
],
#packageNames : [
'Rowan3Example-Core'
],
#comment : ''
}
The RwLoadComponent is the only class of component that may be specified
for loading. In this example The Core component will load the package
named: 'Rowan3Example-Core'. There are no projects referenced by this
component so no other projects will be loaded when this component is loaded.
The component named 'tests/Tests' is referenced so here is what it looks
like[3]:
RwSubcomponent {
#name : 'tests/Tests',
#condition : 'tests',
#projectNames : [ ],
#componentNames : [ ],
#packageNames : [
'Rowan3Example-Tests'
],
#comment : ''
}
The RwSubComponent can only be referenced from a load component or another
sub component, so it is not possible to load just the tests/Tests packages
...
Note that the package 'Rowan3Example-Tests' will only be loaded if 'tests'
is include2 in the #customConditionalAttributes of a RwLoadSpecification
... coming up.
Here's an example of load component that references an external project[4]:
RwLoadComponent {
#name : 'Core',
#projectNames : [
'RowanSample10'
],
#componentNames : [
'tests/Tests'
],
#packageNames : [
'RowanSample9V3-Core'
],
#comment : 'Primary component used for loading the core classes.'
}
Note that this time, a project name is specified 'RowanSample10' in the
#projectNames field. This indicates that there will be a load specification
of that name in the "projects" directory of the RowanSample9V3 project ...
and here it is[5]:
RwLoadSpecificationV2 {
#specName : 'RowanSample10',
#projectName : 'RowanSample10',
#gitUrl : 'git at github.com:dalehenrich/RowanSample10.git',
#revision : 'spec_0001',
#projectSpecFile : 'rowan/project.ston',
#componentNames : [
'Core'
],
#customConditionalAttributes : [
'tests'
],
#platformProperties : {
'gemstone' : {
'allusers' : {
#defaultSymbolDictName : 'RowanSample9_2'
}
}
},
#comment : ''
}
A load specification is an object that specifies the default parameters
that are used to load the project. Note that the #gitUrl field references
the RowanSampl10 project on github[6] and specifies the branch name
'spec_0001' from the revision field.
>From the load spec above, you can see that the component named 'Core' will
be loaded and that the 'tests' attribute is set and as we have seen above,
that means the tests subcomponent will be loaded...
To kick off the load process for RowanSample10 by itself, you would execute
the following smalltalk expression:
(RwSpecification fromUrl: '
https://raw.githubusercontent.com/dalehenrich/RowanSample10/refs/heads/spec_0001/rowan/specs/spec_0001.ston')
projectsHome: '<path directory to clone the project>';
load
The component structure is an object-based declaration of the relationship
of the packages in the project and external projects ....
Rowan also provides a fairly complete API for constructing and manipulating
Rowan definitions. Here's a link to the README[7] of the Rowan3Example from
above. The README contains the smalltalk code used to create and load the
project...
There's more, but hopefull, this will give you an idea of some of the
improvements over Metacello that Rowan brings.
[1]
https://github.com/dalehenrich/Rowan3Example/blob/master/rowan/components/Core.ston
[2] https://github.com/dalehenrich/Rowan3Example
[3]
https://github.com/dalehenrich/Rowan3Example/blob/master/rowan/components/tests/Tests.ston
[4]
https://github.com/dalehenrich/RowanSample9V3/blob/spec_0060/rowan/components/Core.ston
[5]
https://github.com/dalehenrich/RowanSample9V3/blob/spec_0060/rowan/projects/RowanSample10.ston
[6] https://github.com/dalehenrich/RowanSample10/tree/spec_0001
[7] https://github.com/dalehenrich/Rowan3Example/blob/master/README.md
I also did not find any code/examples how it integrates with git.
>
The following statement is from the Rowan3Example README[1] and if you add
the ">" line where indicated, a git repository will be created in that disk
location, unless it is already a git repository:
definedProject := (Rowan newProjectNamed: projectName)
projectsHome: rowanProjectsHome;
">" gitUrl: 'gitUrl://', rowanProjectsHome, '/', projectName
specName: projectName;
specComponentNames: { 'Core' };
"..."
[1] https://github.com/dalehenrich/Rowan3Example/blob/master/README.md
Is it using FileTree to export the files which then can be picked up by git?
Rowan writes FileTree and Tonel format packages ... each project can select
the package format to use for the project.
> I tried to export a library from GemStone 3.7.1 using Jade (Dev) and
> seaside extent (from UserGlobals), but the "Save as Tonel Package"
> option is grayed out (unavailable). I can FileOut the UserGlobals
> dictionary, but I wonder why I can't use export Tonel package.
>
Is it due to a fact that Rowan 3 is not available for the this extent?
>
This would be a question for James, since he maintains Jade. At the present
time Jade is not expected to work with Rowan. It is in the plans to allow
Jade to be used to edit code in a Rowan image, but unless explicit support
is added Jadeite, the Rowan API would be used to export changes made in a
Rowan image using Jade ... HOWEVER right now, you need to use Rowan 3 and
JadeiteForPharo to experiment with Rowan
Can I use a lower version of Rowan (1 or 2) for Jade/Jadeite (since I'm
> not using JadeiteForPharo) with the GS 3.7.x
>
Patrik, I want to be clear that Jade and Jadeite and JadeiteForPharo are
three separate code browser solutions for GemStone and only Jadeite and
JadeiteForPharo are expected to work with Rowan... and if you are
experimenting with Rowan and Jadeite, you should be using
extent0.rowan3.dbf and JadeiteForPharo ... extent0.rowan3.dbf is only
available in 3.7.1 and later releases.
or I have to wait until Rowan3 is compatible with seaside?
>
well if you want to use Rowan to work with existing github projects for
GemStone, you have to wait a little bit longer ...
We certainly understand that we need to provide a way to convert a
BaselineOf into Rowan 3 meta data ... We're still working on fleshing out
some of the missing features of Rowan 3 so even if we had a BaselineOf to
Rowan conversion script it wouldn't be a good time to expect to use Rowan 3
for production ...
>
> As I understand it, for now you need Rowan 3 for JadeiteForPharo only.
>
That is correct.
>
> This is really important piece of puzzle that I was missing.
>
sorry about that ...
>
> >
> > What we are working on that might be helpful for you, is a version of
> > Jadeite for Pharo that is usable against extent0.dbf, without needing
> > to
> > load all of Rowan....
> >
> Yes, this will be really useful if I could use JadeiteForPharo, Rowan 3
> , and seaside at the same time.
>
Until Rowan 3 has become release ready you will be able to use
JadeiteForPharo with seaside, but we are still ironing out the details
since code will have to be added to an extent0.seaside.dbf to be able to
use JadeiteForPharo with a non-Rowan image ... Currently we are able to
browse and edit a seaside extent with JadeiteForPharo but we still need to
add a Monticello package browser and work out the details of how we're
going to handle installing the "RowanToMonticello glue"code into an image
... this will have to include support for upgrades,as well, I assume ...
And again, JadeiteForPharo cannot be used with GemStone versions older that
3.7.0...
Dale
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/archives/glass/attachments/20241127/30770821/attachment.htm>
More information about the Glass
mailing list