Bug (and fix?) with #doSilently: and FileLibrary
Hi guys, I noticed that when we add files to FileLibrary using provided methods like both methods are created, #selectorsToInclude and whatever you have updated, say, #myCss. However, if you go to Monticello Browser, only #selectorsToInclude appears. Digging a bit, I found out that Seaside ends up using Grease for that. And Grease does: GRPharoPlatform >>compile: aString into: aClass classified: aSymbol self doSilently: [ aClass compile: aString classified: aSymbol ] And then, of course, the doSilently, ends up doing: GRPharoPlatform >> doSilently: aBlock "Deals with a different between Pharo1.x and Pharo2.x" ^ (Smalltalk includesKey: #SystemChangeNotifier) ifTrue:[(Smalltalk at: #SystemChangeNotifier) uniqueInstance doSilently: aBlock] ifFalse:[(Smalltalk at: #SystemAnnouncer) uniqueInstance suspendAllWhile: aBlock] So...first, I don't like that a method named like #compile:into:classified: does a silently compilation. Normally, we have the "silently" as part of the selector (or a boolean parameter). Second, why would we want to compile silently? the idea is that after, we commit the FileLibrary...so if the method is not there, it is a problem. So, should we change the #compile:into:classified: to NOT do the silently? Thanks, -- Mariano http://marianopeck.wordpress.com
mariano Can you check on the seaside bug tracker because I fixed a similar problem and I think that it was integrated. Stef On Oct 10, 2013, at 10:53 PM, Mariano Martinez Peck <marianopeck@gmail.com> wrote:
Hi guys,
I noticed that when we add files to FileLibrary using provided methods like both methods are created, #selectorsToInclude and whatever you have updated, say, #myCss. However, if you go to Monticello Browser, only #selectorsToInclude appears. Digging a bit, I found out that Seaside ends up using Grease for that. And Grease does:
GRPharoPlatform >>compile: aString into: aClass classified: aSymbol self doSilently: [ aClass compile: aString classified: aSymbol ]
And then, of course, the doSilently, ends up doing:
GRPharoPlatform >> doSilently: aBlock "Deals with a different between Pharo1.x and Pharo2.x" ^ (Smalltalk includesKey: #SystemChangeNotifier) ifTrue:[(Smalltalk at: #SystemChangeNotifier) uniqueInstance doSilently: aBlock] ifFalse:[(Smalltalk at: #SystemAnnouncer) uniqueInstance suspendAllWhile: aBlock]
So...first, I don't like that a method named like #compile:into:classified: does a silently compilation. Normally, we have the "silently" as part of the selector (or a boolean parameter). Second, why would we want to compile silently? the idea is that after, we commit the FileLibrary...so if the method is not there, it is a problem.
So, should we change the #compile:into:classified: to NOT do the silently?
I would say yes :)
Thanks,
-- Mariano http://marianopeck.wordpress.com
participants (2)
-
Mariano Martinez Peck -
Stéphane Ducasse