Set vs. IdentitySet in WAFileLibrary>>#filenames

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Set vs. IdentitySet in WAFileLibrary>>#filenames

Paolo Bonzini-2
Hi,

Gwenael Casaccio recently found the following assumption in Seaside
while working on an unrelated change to GNU Smalltalk.

In WAFileLibrary>>#filenames, you are building strings from selectors:

         ^self fileSelectors collect: [:each | self asFilename: each]

This however is assuming that #fileSelectors (and hence
Behavior>>#selectors) returns an Array or a Set.  Gwen would like to
change Behavior>>#selectors return an IdentitySet.  In this case
#filenames would return an IdentitySet of strings, which is pretty much
unusable.

The possible solution is to send #asArray or #asSet before #collect:.
Does this seem okay?  Can you make the change so that when I finally
upgrade to 3.0.x I will not see this issue?

Thanks!

Paolo
_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
Reply | Threaded
Open this post in threaded view
|

Re: Set vs. IdentitySet in WAFileLibrary>>#filenames

Julian Fitzell-2
Looks ok... let's make sure to add a comment to that effect though.
Could you file an issue so there's a history and it doesn't get
dropped?

On Thu, May 26, 2011 at 10:04 AM, Paolo Bonzini <[hidden email]> wrote:

> Hi,
>
> Gwenael Casaccio recently found the following assumption in Seaside while
> working on an unrelated change to GNU Smalltalk.
>
> In WAFileLibrary>>#filenames, you are building strings from selectors:
>
>        ^self fileSelectors collect: [:each | self asFilename: each]
>
> This however is assuming that #fileSelectors (and hence
> Behavior>>#selectors) returns an Array or a Set.  Gwen would like to change
> Behavior>>#selectors return an IdentitySet.  In this case #filenames would
> return an IdentitySet of strings, which is pretty much unusable.
>
> The possible solution is to send #asArray or #asSet before #collect:. Does
> this seem okay?  Can you make the change so that when I finally upgrade to
> 3.0.x I will not see this issue?
>
> Thanks!
>
> Paolo
> _______________________________________________
> seaside-dev mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
>
_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
Reply | Threaded
Open this post in threaded view
|

Re: Set vs. IdentitySet in WAFileLibrary>>#filenames

Paolo Bonzini-2
On 05/26/2011 10:22 PM, Julian Fitzell wrote:
> Looks ok... let's make sure to add a comment to that effect though.
> Could you file an issue so there's a history and it doesn't get
> dropped?

Done, issue 657.

Paolo
_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
Reply | Threaded
Open this post in threaded view
|

Re: Set vs. IdentitySet in WAFileLibrary>>#filenames

Philippe Marschall
2011/5/27 Paolo Bonzini <[hidden email]>:
> On 05/26/2011 10:22 PM, Julian Fitzell wrote:
>>
>> Looks ok... let's make sure to add a comment to that effect though.
>> Could you file an issue so there's a history and it doesn't get
>> dropped?
>
> Done, issue 657.

I'm not sure I understand the issue. WAFileLibrary>>#fileSelectors
will always return a Set because it creates one, adds stuff to it and
then returns it.

Cheers
Philippe
_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
Reply | Threaded
Open this post in threaded view
|

Re: Set vs. IdentitySet in WAFileLibrary>>#filenames

Paolo Bonzini-2
On Sun, Jun 19, 2011 at 16:57, Philippe Marschall
<[hidden email]> wrote:
> I'm not sure I understand the issue. WAFileLibrary>>#fileSelectors
> will always return a Set because it creates one, adds stuff to it and
> then returns it.

It's been fixed already, thanks!

Paolo
_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev