[Cuis-dev] Ordering of method categories gets lost sometimes

Gerald Klix cuis.01 at klix.ch
Tue May 3 07:53:59 PDT 2022


I took a second look on my Haver code. As you might have expected, I messed around with #compilerClass in Haver,
meaning I added this one:

Class>>#compilerClass
compilerClass
"Answer a compiler class appropriate for source methods of this class."

^ self class compilerClass
It's delegate to the meta-class which invokes Behavior>>#compilerClass.
This way I am able to use another Compiler for Haver's Module, that features
a parser, that in turn implements automatic importing of bindings.
I can redefine it again for modules that support multiple-dispatch.

Summary: No harm done at all!

Best Regards,
Gerald
On May 2 2022, at 7:26 pm, Juan Vuletich <JuanVuletich at zoho.com> wrote:
> Just pushed the changes to GitHub.
>
> For Haver, you could reload them, but again, you'd lose the ordering of categories. I think the 2 package solution is better, but it's your call.
> Cheers,
> On 5/2/2022 10:44 AM, Gerald Klix via Cuis-dev wrote:
> >
> > I am beginning to remember why I did this.
> > I once developed a rather large package that implements multiple-dispatch.
> > For that purpose I implemented a custom compiler and two Parser classes,
> > including the shout part. Not to mention the decompiler.
> >
> > I was not able to compile any test code, because #compilerClass needs to be defined,
> > to compiler the remaining code. Of course this can be solved by defining an abstract super class
> > in a distinct package, that just defines #compilerClass, but I deem that solution ugly.
> >
> > A sensible solution would be to file out the category definitions before the code.
> > I would like to keep it for Haver, but this isn't a big deal.
> > I had to sub-class CodePackage anyway, to make it deal with emvironments/modules.
> > So drop me a note if you want to change it, I can cope.
> >
> >
> > HTH,
> > Gerald
> > On May 2 2022, at 3:29 pm, Juan Vuletich via Cuis-dev <cuis-dev at lists.cuis.st> (mailto:cuis-dev at lists.cuis.st) wrote:
> > > I think that #selectorNeededForFilein: and doing that distinction for package files introduces non-obvious, confusing behavior. I wasn't aware of this.
> > >
> > > I think it is best to remove all this, make it as it was before this batch of changes from January, 2019. And if any package has trouble being loaded, the it should be split in two, using package dependency to load the first part.
> > > Do you agree, folks? I can do the required changes.
> > > Thanks,
> > > On 4/29/2022 7:40 AM, Luciano Notarfrancesco via Cuis-dev wrote:
> > > >
> > > > Found the problem: Metaclass class>>#isScarySelector:.
> > > >
> > > > Juan, what do you think we should do? One way is to reorder all method categories at the end of the package file, but that will make package files grow quite a bit.
> > > >
> > > >
> > > > On Thu, 28 Apr 2022 at 6:58 PM Gerald Klix <cuis.01 at klix.ch (mailto:cuis.01 at klix.ch)> wrote:
> > > > > Yep, I gave up ordering them manually. And I just noticed, that I was the last one, who touched the responsible pieces of code ...
> > > > >
> > > > >
> > > > > HTH,
> > > > > Gerald
> > > > > On Apr 28 2022, at 1:39 pm, Luciano Notarfrancesco via Cuis-dev <cuis-dev at lists.cuis.st (mailto:cuis-dev at lists.cuis.st)> wrote:
> > > > > > Has anyone noticed that the ordering of method categories is lost when saving a package? Lately I noticed that ‘printing’ ends up at the top, not sure why but there seems to be something special about ‘printing’. I haven’t researched the problem yet, just wondering if this is happening only with my package or if it happens to other people. --
> > > > > > Cuis-dev mailing list
> > > > > > Cuis-dev at lists.cuis.st (mailto:Cuis-dev at lists.cuis.st)
> > > > > > https://lists.cuis.st/mailman/listinfo/cuis-dev
> > > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Juan Vuletich
> > > www.cuis-smalltalk.org (http://www.cuis-smalltalk.org)https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Devhttps://github.com/jvuletichhttps://www.linkedin.com/in/juan-vuletich-75611b3https://independent.academia.edu/JuanVuletichhttps://w
> > > ww.researchgate.net/profile/Juan-Vuletich (https://www.researchgate.net/profile/Juan-Vuletich)https://patents.justia.com/inventor/juan-manuel-vuletichhttps://twitter.com/JuanVuletich
> > > --
> > > Cuis-dev mailing list
> > > Cuis-dev at lists.cuis.st (mailto:Cuis-dev at lists.cuis.st)
> > > https://lists.cuis.st/mailman/listinfo/cuis-dev
> >
>
>
>
> --
> Juan Vuletich
> www.cuis-smalltalk.org (http://www.cuis-smalltalk.org)https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Devhttps://github.com/jvuletichhttps://www.linkedin.com/in/juan-vuletich-75611b3https://independent.academia.edu/JuanVuletichhttps://www.researchgate.net/profile/Juan-Vuletichhttps://patents.justia.com/inventor/juan-manuel-vuletichhttps://twitter.com/JuanVuletich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220503/45ab5cf8/attachment.htm>


More information about the Cuis-dev mailing list