[Glass] Issue_260

Jupiter Jones jupiter.jones at mail.com
Fri Mar 12 16:41:48 PST 2021


Hi Dale,

> The initial plan for issue_260 was to use st_launcher-based[2] scripts to drive topaz solo scripts to replace all of the 32-bit Pharo-based script. The topaz solo extent would have Rowan pre-loaded and I had created an extent based on 3.5.0 (IIRC) that's still available on github[3].
> 
> In the last year, I have written several st_launcher scripts in support of various development tasks for Rowan and I have not been happy with the utility of basing scripts on tonel class files. My basic problem is that while tonel class files ARE human readable, the format is a bit too verbose for my taste ... Don't get me wrong I really do love the fact that I can add support methods and instance variables to a script so that it is possible to refactor the mainline doit into a compact chunk of smalltalk code, but  the extra structure that comes  with the tonel class format adds extra noise to the file that gets in my way when reading code. Here is a simple error producing script from stlauncher[4] and a similar script in superdoit[5] and to my eyes the superdoit is easier to read. If you forego  options and a usage section, the script[6] is much simpler than anything possible with st_launcher... Here's a sample[7] that illustrates the planned format/structure of a superdoit script.

Sounds/looks good.

> At this point, we would  want superdoit to work with 3.6.0 (the Rowan extent just needs a standard 3.6.0 product tree to run topaz solo). I've been doing development with 3.7.0 ... 3.6.0 is using an older version of Rowan and probably doesn't have all of things I'm using now (3.6.1 is using the same version of Rowan as 3.7.0, but it hasn't made it out the door yet), but I can supply you with an extent0.rowan.dbf for 3.6.0 that would work in the short term …

Perfect.

> You are already on the issue_260 team[8] so we can take this conversation to discussion list[9] on github to work out any additional details ... off the top of my head I will need to get the following things done before you are cleared for take off:
> port superdoit to work with 3.6.0
> last month I created the issue_260_2021 branch[10] where I intended to start setting up shop, so I just need to populate the branch with the artifacts needed to get started  (basically the scripts from issue_260 branch[11] updated to reflect the new setup ...
> extra credit for updating GsDevKit_home install scripts with new mac installation scripts ... this would be a good candidate for you to do as a first task while you wait for me to get things in order
When you say “new mac installation scripts” do you mean updating the GsDevKit/bin shell scripts to support the M1? Is there a version of GS that will run on the M1 yet?

Or do you mean the bootstrap_launcher scripts?

I have a new MacMini M1, and an intel laptop which is still running OSX10.14 so it can run 32bit Pharo.
> The GsDevKit_launcher project is embedded in the issue_260 branch[12] ($GS_HOME/shared/repos/GsDevKit_launcher). This project was intended to be the place where the GsDevKit_home support classes were ported from Pharo ... in the st_launcher model the tonel class script files would be housed there as well ... so I would plan on porting the st_launcher scripts to superdoit scripts ... in doing this work myself, I'd know that superdoit was ready for use …
I’ve been attempting to set this up today, but encountered a couple of errors during install.

One simple error was resolved (no pull request yet) on https://github.com/JupiterSmalltalk/GsDevKit_home/tree/issue_260_JJ_MacOS <https://github.com/JupiterSmalltalk/GsDevKit_home/tree/issue_260_JJ_MacOS>

The next one I haven’t investigated yet (just saw it before replying to this email). I’ve attached the stack at the end of this email. Let me know if this is worth pursuing, or if I should leave it and start work with your new extent.

> In order to get you up to speed, once I've finished my work, it might make sense to use vnc/slack/cell(?) to do a bit of pair programming?

That would be great.

> In the mean time you could bring up the devKitCommandLine pharo image (devKitCommandLine -D , then use the Pharo>>Pharo World Menu item on the tODE menu to browse the Pharo source) and browse the classes in the GsDevKit-CommandLIne, GsDevKit-SmalltalkCI-CommandLine, and GsDevKit-Tode-CommandLine packages to get an idea of what classes we'll need to port to GemStone …

I’ve been browsing these this morning to work out what I’d start one. Was going to start with something simple like “stones” to get my template right. But will wait now to make superdoit versions instead.

Let me know how you’d like me to proceed.

Cheers,

J

Error during source import from bootstrap_launcher

[Info]: User ID: SystemUser
[Info]: Repository: gsdevkit_launcher_350
[Info]: Session ID: 6 login at 13/03/2021 09:59:52.792 AEDT
[Info]: GCI Client Host: <Linked>
[Info]: Page server PID: -1
[13/03/2021 09:59:52.794 AEDT]
  gci login: currSession 1  linked session 
successful login
topaz 1> 
topaz 1> # Install FileSystem, Rowan, Cypress, STON, and Tonel using Rowan to adopt the existing classes and extension
topaz 1> #  methods into the correct package structure
topaz 1>   run
	"install_3.tpz"
 	| projectSetDefinition gitRepoPath packageCreateTool loadedProjectInfo auditFailures readTool
		reAudit gitRoot |
  SessionTemps current at: #ROWAN_TRACE put: #gciLogServer . "log to topaz output file"
	projectSetDefinition := RwProjectSetDefinition new.
	loadedProjectInfo := Dictionary new.
	gitRepoPath := '$ROWAN_PROJECTS_HOME/Rowan'.
	readTool := Rowan projectTools read.
	{
		{
			'file:$ROWAN_PROJECTS_HOME/Rowan/platforms/gemstone/topaz/3.5.0/specs/FileSystemGs_component.ston'. 
			'$ROWAN_PROJECTS_HOME/Rowan/platforms/gemstone/projects'
		}.
		{
			'file:$ROWAN_PROJECTS_HOME/Rowan/rowan/specs/RowanV2.ston'. 
			'$ROWAN_PROJECTS_HOME'
		}.
		{
			'file:$ROWAN_PROJECTS_HOME/Rowan/platforms/gemstone/topaz/3.5.0/specs/Cypress_component.ston'.
			'$ROWAN_PROJECTS_HOME/Rowan/platforms/gemstone/projects'
		}.
		{
			'file:$ROWAN_PROJECTS_HOME/Rowan/platforms/gemstone/topaz/3.5.0/specs/STON_component.ston'.
			'$ROWAN_PROJECTS_HOME/Rowan/platforms/gemstone/projects'
		}.
		{
			'file:$ROWAN_PROJECTS_HOME/Rowan/platforms/gemstone/topaz/3.5.0/specs/Tonel_component.ston'.
			'$ROWAN_PROJECTS_HOME/Rowan/platforms/gemstone/projects'
		}.
	} 
	do: [:ar |
		"Read project and packages from disk, creating a projectSetDefinition with all 5 projects"
		| configNames groupNames projectDefinition theProjectSetDefinition specUrl projectHome |
		specUrl := ar at: 1.
		projectHome := ar at: 2.
		gitRoot := '$ROWAN_PROJECTS_HOME/Rowan'.
		projectDefinition := (RwComponentProjectDefinition newForUrl: specUrl) 
			projectHome: projectHome;
			gitRoot: gitRoot;
			yourself.
		theProjectSetDefinition := readTool 
			readProjectSetForComponentProjectDefinition: projectDefinition 
				withConfigurations: projectDefinition defaultConfigurationNames 
				groupNames: projectDefinition defaultGroupNames.

		loadedProjectInfo 
			at: projectDefinition name 
			put: ((theProjectSetDefinition properties at: 'loadedProjectInfo') at: projectDefinition name).

		theProjectSetDefinition
			do: [:projectDefinition |	
				GsFile stdout nextPutAll: 'Project: ', projectDefinition name; lf.
				projectDefinition packageNames do: [:pkgName | 
					GsFile stdout nextPutAll: '	', pkgName; lf ].
				projectSetDefinition addProject: projectDefinition ] ].

	loadedProjectInfo keysAndValuesDo: [:projectName :projectInfo |
		"install the packageMapSpecs for this load into the specification prior to the load"
		| projectDefinition thePackageMapSpecs |
		projectDefinition := projectSetDefinition projectNamed: projectName ifAbsent: [].
		thePackageMapSpecs := projectInfo at: 'packageMapSpecs' .
		(thePackageMapSpecs at: #defaultSymbolDictName otherwise: nil) 
			ifNotNil: [:name | 
				projectDefinition defaultSymbolDictName: name ].
		(thePackageMapSpecs at: #defaultUseSessionMethodsForExtensions otherwise: nil) 
			ifNotNil: [:boolean | 
				projectDefinition defaultUseSessionMethodsForExtensions: boolean  ].
		(thePackageMapSpecs at: #packageNameToPlatformPropertiesMap otherwise: nil) 
			ifNotNil: [:map |
				projectDefinition packageNameToPlatformPropertiesMap: map ] ].

	packageCreateTool := Rowan packageTools create.
	projectSetDefinition projects 
		do: [:projectDefinition |
			"Create loaded project (if needed), traverse the package definitions and 
				create loaded packages for each"
			| projectName |
			projectDefinition register.	"make sure that the project is created"
			projectName := projectDefinition name.
			projectDefinition packageNames
				do: [:packageName |
					packageCreateTool createLoadedPackageNamed: packageName inProjectNamed: projectName ] ].

	"Adopt the project set definition ... 
		Log and ignore any missing method or missing classes encountered as they may not be
		present in the .gs bootstrap file for the proejct ... The will be created when we
		reload the project a little bit later on."
	[ Rowan projectTools adopt adoptProjectSetDefinition: projectSetDefinition ]
		on: RwAdoptMissingMethodErrorNotification, RwAdoptMissingClassErrorNotification
		do: [:ex |
			ex
				methodErrorDo: [ GsFile gciLogServer: 'Missing loaded method ', ex methodPrintString, ' encountered during adopt ... IGNORED' ]
				classErrorDo: [  GsFile gciLogServer: 'Missing loaded class ', ex className, ' encountered during adopt ... IGNORED' ].
			ex resume: nil ].

	projectSetDefinition projects 
		do: [:projectDefinition |
			"make sure that the loaded SHA is set for each project"
			projectDefinition updateLoadedCommitId.
			(loadedProjectInfo at: projectDefinition name ifAbsent: [])
				ifNotNil: [:map |
					projectDefinition specification imageSpec
						loadedConfigurationNames: (map at: 'loadedConfigurationNames');
						loadedGroupNames: (map at: 'loadedGroupNames') ] ].

	projectSetDefinition deriveLoadedThings do: [:loadedProject |
		"mark projects and packages not dirty"
		loadedProject markNotDirty.
		loadedProject loadedPackages valuesDo: [:loadedPackage | loadedPackage markNotDirty ] ].

	reAudit := true.	"kick off the first audit"
	[ reAudit ] whileTrue: [
		auditFailures := {}.
		reAudit := false.
		projectSetDefinition projects
			do: [:projectDefinition |
				| audit projectName |
				projectName := projectDefinition name.
				[audit := Rowan projectTools audit auditForProjectNamed: projectName ]
					on: RwAuditMethodErrorNotification
					do: [:ex |
						| beh |
						GsFile gciLogServer: 'extra unpackaged method ', ex methodPrintString, ' encountered during audit ... REMOVED (audit will be rerun)'.
						"method is not present in the current package structure, so it should be removed"
						beh := Rowan globalNamed: ex className.
						ex isMetaclass ifTrue: [ beh := beh class ].
						beh removeSelector: ex selector.
						"don't record as an audit error, but make sure that we rerun the audit"
						reAudit := true.
						ex resume: false ].
				GsFile gciLogServer: '	-- audit finished '. 
				audit isEmpty 
					ifFalse: [
						reAudit := false. "we must have had an audit failure that was not handled" 
GsFile gciLogServer: 'FAILED AUDIT: ', projectName.
						auditFailures add: projectName ] ].
		reAudit ifTrue: [ GsFile gciLogServer: 'RERUN AUDIT' ] ].
	auditFailures isEmpty 
		ifFalse: [ 
			self error: 'Post load Rowan audit failed for projects ', auditFailures printString ] .
  true	
%
ERROR 2059 , a AlmostOutOfStack occurred (notification 2059), Smalltalk execution stack error, 'overflow during execution' (AlmostOutOfStack)

Stack overflow,  Stack depth 4090 
topaz > exec iferr 1 : stk 
==> 1 AlmostOutOfStack (AbstractException) >> _signalFromPrimitive: @24 line 26
2 DiskStore class >> current                    @1 line 1
3 DiskStore class >> delimiter                  @2 line 2
4 DiskStore (FileSystemStore) >> delimiter      @3 line 2
5 DiskStore class >> delimiter                  @3 line 2
6 DiskStore (FileSystemStore) >> delimiter      @3 line 2
7 DiskStore class >> delimiter                  @3 line 2

...

4077 DiskStore class >> delimiter                  @3 line 2
4078 DiskStore (FileSystemStore) >> delimiter      @3 line 2
4079 DiskStore (FileSystemStore) >> pathFromString: @2 line 4
4080 FileSystem >> pathFromString:                 @2 line 2
4081 Unicode7 (CharacterCollection) >> asPathWith: @2 line 2
4082 FileSystem >> pathFromObject:                 @2 line 2
4083 FileSystem >> referenceTo:                    @2 line 7
4084 Unicode7 (CharacterCollection) >> asFileReference @3 line 3
4085 RwProjectReferenceDefinition >> projectHome:  @8 line 6
4086 RwComponentProjectDefinition >> projectHome:  @3 line 3
4087 [] in Executed Code                           @48 line 38
4088 Array (Collection) >> do:                     @6 line 10
4089 Executed Code                                 @13 line 31
4090 GsNMethod class >> _gsReturnToC               @1 line 1
topaz > exec iferr 2 : stack 
==> 1 AlmostOutOfStack (AbstractException) >> _signalFromPrimitive: @24 line 26
    receiver a AlmostOutOfStack occurred (notification 2059), Smalltalk execution stack error, 'overflow during e ...(9 more bytes)

    inCextensionArg nil
    res nil
    num 2059
(skipped 1 evaluationTemps)
2 DiskStore class >> current                    @1 line 1
    receiver DiskStore
3 DiskStore class >> delimiter                  @2 line 2
    receiver DiskStore
(skipped 1 evaluationTemps)

...

4077 DiskStore class >> delimiter                  @3 line 2
    receiver DiskStore
(skipped 1 evaluationTemps)
4078 DiskStore (FileSystemStore) >> delimiter      @3 line 2
    receiver aDiskStore
(skipped 1 evaluationTemps)
4079 DiskStore (FileSystemStore) >> pathFromString: @2 line 4
    receiver aDiskStore
    aString $ROWAN_PROJECTS_HOME/Rowan/platforms/gemstone/projects
(skipped 3 evaluationTemps)
4080 FileSystem >> pathFromString:                 @2 line 2
    receiver aFileSystem
    aString $ROWAN_PROJECTS_HOME/Rowan/platforms/gemstone/projects
(skipped 2 evaluationTemps)
4081 Unicode7 (CharacterCollection) >> asPathWith: @2 line 2
    receiver $ROWAN_PROJECTS_HOME/Rowan/platforms/gemstone/projects
    anObject aFileSystem
(skipped 2 evaluationTemps)
4082 FileSystem >> pathFromObject:                 @2 line 2
    receiver aFileSystem
    anObject $ROWAN_PROJECTS_HOME/Rowan/platforms/gemstone/projects
(skipped 2 evaluationTemps)
4083 FileSystem >> referenceTo:                    @2 line 7
    receiver aFileSystem
    aResolvable $ROWAN_PROJECTS_HOME/Rowan/platforms/gemstone/projects
(skipped 4 evaluationTemps)
4084 Unicode7 (CharacterCollection) >> asFileReference @3 line 3
    receiver $ROWAN_PROJECTS_HOME/Rowan/platforms/gemstone/projects
(skipped 2 evaluationTemps)
4085 RwProjectReferenceDefinition >> projectHome:  @8 line 6
    receiver aRwProjectReferenceDefinition
    projectHomeFileReferenceOrString $ROWAN_PROJECTS_HOME/Rowan/platforms/gemstone/projects
(skipped 3 evaluationTemps)
4086 RwComponentProjectDefinition >> projectHome:  @3 line 3
    receiver aRwComponentProjectDefinition
    aProjectHomeReferenceOrString $ROWAN_PROJECTS_HOME/Rowan/platforms/gemstone/projects
(skipped 2 evaluationTemps)
4087 [] in Executed Code                           @48 line 38
    self nil
    receiver anExecBlock1
    ar anArray
    projectDefinition nil
    theProjectSetDefinition nil
    specUrl file:$ROWAN_PROJECTS_HOME/Rowan/platforms/gemstone/topaz/3.5.0/specs/FileSystemGs_component.ston
    projectHome $ROWAN_PROJECTS_HOME/Rowan/platforms/gemstone/projects
    loadedProjectInfo aDictionary
    readTool aRwPrjReadTool
    gitRoot $ROWAN_PROJECTS_HOME/Rowan
(skipped 3 evaluationTemps)
4088 Array (Collection) >> do:                     @6 line 10
    receiver anArray
    aBlock anExecBlock1
    i 1
(skipped 4 evaluationTemps)
4089 Executed Code                                 @13 line 31
    receiver nil
    projectSetDefinition aRwProjectSetDefinition
    gitRepoPath $ROWAN_PROJECTS_HOME/Rowan
    packageCreateTool nil
    loadedProjectInfo aDictionary
    auditFailures nil
    readTool aRwPrjReadTool
    reAudit nil
    gitRoot $ROWAN_PROJECTS_HOME/Rowan
(skipped 2 evaluationTemps)
4090 GsNMethod class >> _gsReturnToC               @1 line 1
    receiver GsNMethod
topaz 1>   commit
Successful commit


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gemtalksystems.com/mailman/private/glass/attachments/20210313/eca4aa5b/attachment-0001.htm>


More information about the Glass mailing list