[Glass] tode / pharo errors

Dale Henrichs via Glass glass at lists.gemtalksystems.com
Thu Oct 22 16:06:24 PDT 2015



On 10/22/2015 02:08 PM, Jon Paynter wrote:
> yeah it seems knowing too much is getting in the way. I keep wanting 
> to start netldi and then stone, and stop them in reverse order.
>
> but in order to use ssh port forwarding for tode, you will need a way 
> to specify the netldi port number on the startStone cmd, so for now I 
> have to use this:
> ./shared/downloads/products/GemStone64Bit3.2.8-x86_64.Linux/bin/startnetldi 
> -a gemstone -g -P 55278 seaside_ldi
Yes, and the GsDevKit_home way is to set the netLDIPort field in the 
session description to 55278 and then the `startNetldi <stone-name>` 
command will look up the port number in the session description.
>
> So - on the VM here at work, the tode project list is functional and 
> im trying to create a new/blank project and add stuff.  According to 
> the "project entry" man page, II should be able to run this:
>        project entry --git=builderGame --repo=$GS_HOME 
> /home/externalAnd create a new project. but when I put that in the 
> tode shell, i get an error:
> Topez ERROR: a TodeCommandError occurred (error 121000), Unknown 
> option: git
>
> Is the git option not finished? or is it that it cant find git on the 
> host?
This is a bug ... the --git option should work ... I'm falling behind a 
bit as I've been distracted with other things both yesterday and today ...

With that said this particular form of the `project entry` command is 
not for managing Smalltalk code. It is aimed at allowing you to manage a 
git repository that is not just used for code (like GsDevKit_home  ... 
there is some Smalltalk code stored in the git repository for 
GsDevKit_home, but the main content of GsDevKit_home is shell and tODE 
scripts) ... and in your project list you'll see an example called 
`gsDevKit_home` that is attached to the GsDevKit_home git repo ... you 
can't load code from these guys, but you can `save` and `pull`, etc.
> I know a few of the basic git commands, but virtually nothing about 
> MetaCello and how to use it.
Hmmm okay ... There is a chapter on Metacello[1] in the Pharo By Example 
site that should give you some background on Metacello ... it does not 
cover a lot of the newer features of Metacello ... there is a section on 
creating a Baseline here[2] and there is a "Metacello User Guide"[3] 
that covers a lot of the newer features of Metacello. The there's the 
"Lock Command Reference"[4] that has a number of a bit more detailed 
examples that you can learn from ...

Right now tODE is a bit sparse for absolute beginners, but I will be 
writing a `project new` command plus some documentation REAL SOON NOW, 
as I am on the final approach to release and there are a handful of 
things on my todo list that I must finish before the end of the month:)

[1] http://pharobyexample.org/drafts/Metacello.pdf
[2] 
https://github.com/dalehenrich/metacello-work/blob/master/docs/GettingStartedWithGitHub.md#create-baseline
[3] 
https://github.com/dalehenrich/metacello-work/blob/master/docs/MetacelloUserGuide.md#metacello-user-guide
[4] 
https://github.com/dalehenrich/metacello-work/blob/master/docs/LockCommandReference.md#lock-command-reference
>
> Or would it be better to create a blank project by creating stuff in 
> the file system somehow?
>

Okay ... The best way to get started modulo a bunch of study is to 
download and install the Sample project.

Start by cloning the sample project:

   cd $GS_HOME/shared/repos
   git clone https://github.com/dalehenrich/sample.git

Then create a project entry for the sample project in the tODE shell:

   project entry --baseline=Sample 
--repo=filetree://$GS_HOME/shared/repos/sample/repository 
--loads=`#('default')` /sys/stone/projects
   project list

You should see the sample project in the project list (underlined 
because it is not loaded). Then load the Sample project:

   project load Sample
   project list

Now you should see the Sample project loaded in the project list (bold 
because it is active).

Use the "Browse > baseline" menu to bring up the class browse on the 
BaselineOfSample project ... in the baseline: method you see a 
specification for two packages: Sample-Core and Sample-Tests ... 
Sample-Core will be loaded before Sample-Tests, but for now you can 
ignore Sample-Tests (it wasn't loaded by default ... only Sample-Core 
was actually loaded).

Use the "Browse > * " menu items to look at the Sample-Core category and 
package ... go ahead and edit the SampleCore class and refresh the 
project list to see that the dirty projects are marked with a * ... go 
ahead and " save " the project to see what happens and you can visit the 
git repository in the bash shell to look at the disk layout ...

Ask questions about the baseline and anything else that you might have 
... you could even start working on your project and just use the sample 
project for storing checkpoints on disk ... in a follow-on message I'll 
describe the steps for creating a BaselineOf of your very own, a package 
and git repository of your very own (and we can move your classes to the 
new packages ... but this should keep you busy for a little while:)

Maybe I'll just whip up the `project new command this afternoon/eveining:)

Dale



More information about the Glass mailing list