[Cuis-dev] Bug report: File out/in of class with special chars in its name

Juan Vuletich juan at cuis.st
Wed Jul 10 11:48:24 PDT 2024


Just pushed a fix to better validate class names.

Thanks,

On 7/10/2024 12:56 PM, Hernán Wilkinson via Cuis-dev wrote:
>
>
> On Wed, Jul 10, 2024 at 12:52 PM Juan Vuletich <juan at cuis.st 
> <mailto:juan at cuis.st>> wrote:
>
>     It is not just that...
>
>     Class names are to be understood by the compiler. With your
>     example, I can not evaluate `ISW1-2do-Project new`.
>
>
> good point, I did not realize that it did not work for that.
>
>
>     Allowing this would require serious work on the compiler,
>     affecting compatibility, etc. I don't think allowing these kinds
>     of class names is worth it. Wouldn't #ISW1_2do_Project be a
>     reasonable alternative?
>
>
> I agree. This error happened to a student while doing the exam. I did 
> not put too much thought into it... I think therefore that we should 
> not allow creating a class with that name and therefore avoid all the 
> other consequences.
>
> What do you think?
>
> Hernan.
>
>
>     Thanks,
>
>     On 7/10/2024 11:19 AM, Hernán Wilkinson via Cuis-dev wrote:
>>     Hi,
>>      I did not have the time to fix it, that is why I'm reporting it.
>>      If you create a class like this:
>>     Object subclass: #ISW1-2do-Project'
>>     instanceVariableNames: ''
>>     classVariableNames: ''
>>     poolDictionaries: ''
>>     category: 'ISW'
>>
>>     Implement a message in that class, let say #m1.
>>     File out the class or class category
>>     Remove the class or class category
>>     File in the file
>>     The class is created but when filing in its method, fails.
>>     Here is the fileout:
>>
>>     !classDefinition: #'ISW1-2do-Project' category: #ISW!
>>     Object subclass: #'ISW1-2do-Project'
>>     instanceVariableNames: ''
>>     classVariableNames: ''
>>     poolDictionaries: ''
>>     category: 'ISW'!
>>
>>     !ISW1-2do-Project methodsFor: 'as yet unclassified' stamp: 'HAW
>>     7/10/2024 11:12:11'!
>>     m1
>>
>>     ! !
>>
>>     The problem is that the name of the class for the method is
>>     ISW1-2do-Project instead of #'ISW1-2do-Project' and therefore it
>>     is not recognized as a symbol.
>>
>>     Cheers!
>>     Hernan.
>>
>>     -- 
>>     *Hernán Wilkinson
>>     Agile Software Development, Teaching & Coaching*
>>     *Phone: +54-011*-4893-2057
>>     *Twitter: @HernanWilkinson*
>>     *site: http://www.10Pines.com <http://www.10pines.com/>*
>>     Address: Alem 896, Floor 6, Buenos Aires, Argentina
>
>
>     -- 
>     Juan Vuletich
>     cuis.st  <http://cuis.st>
>     github.com/jvuletich  <http://github.com/jvuletich>
>     researchgate.net/profile/Juan-Vuletich  <http://researchgate.net/profile/Juan-Vuletich>
>     independent.academia.edu/JuanVuletich  <http://independent.academia.edu/JuanVuletich>
>     patents.justia.com/inventor/juan-manuel-vuletich  <http://patents.justia.com/inventor/juan-manuel-vuletich>
>     linkedin.com/in/juan-vuletich-75611b3  <http://linkedin.com/in/juan-vuletich-75611b3>
>     twitter.com/JuanVuletich  <http://twitter.com/JuanVuletich>
>
>
>
> -- 
> *Hernán Wilkinson
> Agile Software Development, Teaching & Coaching*
> *Phone: +54-011*-4893-2057
> *Twitter: @HernanWilkinson*
> *site: http://www.10Pines.com <http://www.10pines.com/>*
> Address: Alem 896, Floor 6, Buenos Aires, Argentina


-- 
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240710/7b13b1e7/attachment.htm>


More information about the Cuis-dev mailing list