Skip to content

GemStone compatibility - #386

Open
tukanos wants to merge 52 commits into
magritte-metamodel:masterfrom
nextTukanos:gemStoneCompatibility
Open

GemStone compatibility#386
tukanos wants to merge 52 commits into
magritte-metamodel:masterfrom
nextTukanos:gemStoneCompatibility

Conversation

@tukanos

@tukanos tukanos commented Aug 28, 2025

Copy link
Copy Markdown

Bringing Magritte closer to be compatible with GemStone. Based on my gemstone port.

Patrik Svestka and others added 30 commits August 28, 2025 16:58
Details: Removing url from Gemstone-/Pharo-Seaside from external file
         model extension
A lot more updates for Pharo 12+, few universal fixes and a cleanup:

 - Fixes GeneralScrollPane no longer exists in Pharo 12 magritte-metamodel#356 - replaced use of GeneralScrollPane (that got renamed in recent Pharo versions) by code common to all Pharo versions
 - Fixes Unify Tonel format magritte-metamodel#357 - fixed Tonel version to 1.0 in order to limit commit changes noise, but there still will be some (like transforming package name strings to symbols or renaming class to classSide in method headers)
 - Unified Pharo-specific packages into one (also fixes Repository packages not referenced from baseline magritte-metamodel#376)
 - Fixes Protocols with * prefix magritte-metamodel#377 - Removed some incorrectly saved extension methods (that should not have been extensions at all)
 - Changed Grease dependency from 1.18.0 to 1.18.x to include latest bugfixes
 - GT image detection should now work even in Pharo 13 and non-Pharo
 - Added ContactManager to the baseline
 - Removed configurations (Magritte configurations were incompatible with Pharo 7+ and on the other hand Pharo 6- should use code from SmalltalkHub as no version here on GitHub even works with Pharo 6-)
 - Added Pharo 11 and 12 to CI

The PR - magritte-metamodel#369
Author: Created by: JanBlizenko - https://github.com/JanBliznicenko
 - adjusting baseline to adopt the new package
 - freed Pharo tools package to be able to load

The class "ORCmdClassRefactoring" seems to be part
of squeak camis addons

Link:
https://github.com/camillobruni/squeak-camis-addons/blob/6a509a85352b76ec8860d6db3d4488847f27643b/repository/OB-Refactory.package/ORCmdClassRefactoring.class/properties.json#L10
For more information about GLASS1 visit:
https://github.com/GsDevKit/gsUpgrader?tab=readme-ov-file#gsupgrader-classupgradeglass1

Excerpt:
upgradeGLASS1 will run upgradeGLASS (if necessary), upgradeMetacello, and upgradeGrease.
Converting #category->Symbol to -> String mapping for GS compatibility
Converting #name -> Symbol to -> String mapping for GS compatibility
Converting #superclass -> Symbol to -> String mapping for GS compatibility
To convert Tonel->Filetree run the conversion utility (GS only):
https://github.com/GsDevKit/T2F2T-Conversion

The command:
`bin/t2f2t.sh create ~/magritte t2f2t source filetree`
Fixing package mapping #Symbol : String
The Tonel->Filetree conversion will fail otherwise
 - Metacello in GS is missing Tonel support, but supports Traits
 - Filetree is missing support for Traits (will find a way to load it)
 - directory filetree is create and underneath is the converted
   Filetree source code

To convert Tonel->Filetree run the conversion utility (GS only):
https://github.com/GsDevKit/T2F2T-Conversion and execute:

Conversion command:
`bin/t2f2t.sh filetree ~/magritte/t2f2t`
note: The package is still present at #squeakCommon so it can be loaded
Left description in comment for ancient Pharo 4.x
The information obtained from gsUpgrader page:
https://github.com/GsDevKit/gsUpgrader?tab=readme-ov-file#gsupgrader-classupgradeglass1

Replacing the GLASS1 repository too as it contains more than only
Metacello.  The original baseline had only Metacello as dependency.
I have manually prepared a .topaz file for the trait class loading.
After successfully loading it into GemStone, I have exported it from
GemStone using `trfileout` topaz utility.

A fileout example (in topaz and logged in):
`trfileout trait: MATPropertyOwner tofile: MATPropertyOwner.gs`

To load it (in topaz and logged in):
`input <path>\MATPropertyOwner.gs`

Note: Needs at least GemStone 3.7.2 or higher
Trait's variables used in classes to which the trait was added
(Explained by Dale Henrich):

The trait's instance, class, and class instance variables must match or
be a subset of the instance, class, and class instance variables
of each class to which the trait will be added.
Converted (Tonel -> Filetree) MATPropertyOwner trait so it can be loaded
in the future
Patrik Svestka and others added 14 commits August 28, 2025 16:58
Converted (Tonel -> Filetree) TMagritteBootstrap trait so it can be
loaded in the future
  - Migrating missing code from Pharo's tonel to filetree
  - Adjusting baseline as new packages for GemStone was created
MADateDescriptionTest validates conditions also by validating against
non-identical instance.  The problem is that Pharo and GemStone have
different approaches to Date type.

Pharo has a Date as wrapper over DateAndTime, which enables it to use
aDate copy to create new instance of a Date.

In GemStone the Date is an immediate type.  It gives SmallDate if
possible. The only way to have a non-identical instance is to change
the date.
MATimeDescriptionTest validates conditions also by validating against
non-identical instance.  The problem is that Pharo and GemStone have
different approaches to Time type.

Pharo has a Time as wrapper over Duration, which enables it to use
aTime copy to create new instance of a Time.

In GemStone the Time is an immediate type.  It gives SmallTime if
possible. The only way to have a non-identical instance is to change
the time.
 - MACompositeConflict is now a MAObject subclass
 - refactor #isKindOf: as in GemStone #isKindOf: can't be re-implemented
   (as re-implementation of it can be potentially dangerous)
 - Adding the error message that was used in MADescription
   can be now customized in MACompositeConflict for better fit
 - Aligning the validation protocols names among parent and children
 - Apparently the convention is to have the extensions all upper-case
   in Pharo
 - Affects the following protocol names in extensions:
   - *<string>-<string>-<string>-<string>
   - *<string>-<string>-<string>
   - *<string>-<string>
 - Apparently the convention is to have the extensions all lower-case
   in GemStone
 - Affects only *<string>-<string>-<string>
 - Apparently the convention is to have the extensions all lower-case
   in GemStone
 - Affects only *<string>-<string>
@tukanos tukanos changed the title Gem stone compatibility GemStone compatibility Aug 28, 2025
Patrik Svestka added 3 commits August 29, 2025 08:17
@tukanos

tukanos commented Aug 29, 2025

Copy link
Copy Markdown
Author

To clarify more the patches sent. There are 3 major categories.

  • changes to the tonel repository to make code compatible with gemstone
  • adding of filetree structure, which is converted using T2F2T conversion scripts
  • adding separate files to accommodate Traits in GemStone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants