[GemStone-Smalltalk] Class names and VisualWorks namespaces
David Shaffer
shaffer at shaffer-consulting.com
Mon Nov 2 11:34:30 PST 2020
Brilliant, thanks!
-D
> On Nov 2, 2020, at 1:55 PM, Richard Sargent <richard.sargent at gemtalksystems.com> wrote:
>
> A quick glance has me thinking it looks good. It seems quite simple, which is always good - if it does the job. :-)
>
> Topological sort may be overkill. Your requirement is to have the superclasses before the subclasses. So the following example might be entirely adequate.
> | classes sortedClasses |
> classes := Collection withAllSubclasses asSortedCollection: [:a :b | a name > b name].
> sortedClasses := classes asSortedCollection: [:a :b | a allSuperclasses size < b allSuperclasses size].
>
>
> On Mon, Nov 2, 2020 at 10:03 AM David Shaffer via GemStone-Smalltalk <gemstone-smalltalk at lists.gemtalksystems.com <mailto:gemstone-smalltalk at lists.gemtalksystems.com>> wrote:
> Thanks Richard, I guess I was just looking for confirmation that I had to write this code myself. At the moment I’m mapping VW namespaces to GS symbol dictionaries (replacing “.” with __ and ignoring containment of one namespace inside another). This keeps classes unambiguous on the server. Code attached “kind of” works and comments are welcomed but not expected ;) Now I have to sort out all of the magic in GbsSession>>createGemStoneClassFor:copyOldVersion: and GbsSession>>doesClientClass:matchServerClass: since those methods handle lots of special cases (class already exists with same/different structure etc) but are, unfortunately, interactive.
>
> (Sorry about the crappy Topological sort…it will need to be revisited if you’re publishing a large number of classes).
>
> Best,
>
> David
>
>
>
>> On Nov 2, 2020, at 12:51 PM, Richard Sargent <richard.sargent at gemtalksystems.com <mailto:richard.sargent at gemtalksystems.com>> wrote:
>>
>> On Tue, Oct 27, 2020 at 7:48 PM David Shaffer via GemStone-Smalltalk <gemstone-smalltalk at lists.gemtalksystems.com <mailto:gemstone-smalltalk at lists.gemtalksystems.com>> wrote:
>> Am I misunderstanding or does GemBuilder for VisualWorks ignore VisualWorks namespaces when automatically generating server classes and automatically creating connectors?
>>
>> From the GBS for VisualWorks documentation:
>> GemBuilder deposits automatically generated GemStone server classes in the
>> GemStone symbol dictionary UserClasses, which it creates if necessary.
>> Automatically generated client Smalltalk classes are deposited in the current
>> package.
>> With respect to the "ignore VisualWorks namespaces" part of your question, I think the best way to answer it is "pretty much".
>>
>> As noted in the documentation, this automatic class generation is intended as a developer convenience. It is still best to deploy code to each environment in advance of running the application and to predefine the class connectors that could have a conflict or otherwise be unreachable by name lookup.
>>
>>
>> Best,
>>
>> David
>>
>> _______________________________________________
>> GemStone-Smalltalk mailing list
>> GemStone-Smalltalk at lists.gemtalksystems.com <mailto:GemStone-Smalltalk at lists.gemtalksystems.com>
>> https://lists.gemtalksystems.com/mailman/listinfo/gemstone-smalltalk <https://lists.gemtalksystems.com/mailman/listinfo/gemstone-smalltalk>
>
> _______________________________________________
> GemStone-Smalltalk mailing list
> GemStone-Smalltalk at lists.gemtalksystems.com <mailto:GemStone-Smalltalk at lists.gemtalksystems.com>
> https://lists.gemtalksystems.com/mailman/listinfo/gemstone-smalltalk <https://lists.gemtalksystems.com/mailman/listinfo/gemstone-smalltalk>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gemtalksystems.com/mailman/private/gemstone-smalltalk/attachments/20201102/881100c3/attachment-0001.htm>
More information about the GemStone-Smalltalk
mailing list