[squeak-dev] The Inbox: Tools-lrnp.1140.mcz

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Sat Mar 26 15:44:48 UTC 2022

Hi Marcel, hi Lauren,

I suggested an alternative fix to this problem in Tools-ct.1145 (inbox). Am I missing anything else here?

To reproduce the bug, open a system browser, focus the system category list without selecting any item, and press Escape.



Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Lauren Pullen <drurowin at gmail.com>
Gesendet: Montag, 14. März 2022 21:18:53
An: squeak-dev at lists.squeakfoundation.org
Betreff: Re: [squeak-dev] The Inbox: Tools-lrnp.1140.mcz

Hi Marcel,

On 3/14/22 11:59, Marcel Taeumel wrote:
> This will raise a debugger:
>    PackageOrganizer default packageOfSystemCategory: nil
> This will not raise a debugger:
>    PackageOrganizer default packageOfSystemCategory: nil ifNone: nil
... Very strange.  Both raise a debugger on MNU for me in

I'll append my list at the end.  I'm curious what yours is, since you
don't have the problem.

>>  and noticed PackageInfo handles the nil system category as never yourself
> I don't understand what you mean here. :-/
Sorry for the poor wording.

PackageInfo>>category:matches: starts with a test for categoryName isNil
and returns false in that case.
>> That discovered, I still think putting a short circuit return in
>> PackageOrganizer makes sense. If nil means 'not me', why spend time
>> enumerating?
> Well, you suggest a typical "ifNil"-check. The contract in #packageOfSystemCategory:ifNone: is that only valid system categories are used as the "aSystemCategory" argument. Providing 'nil' is not a valid system category. Now, anything can happen. Usually, we rely on the fact that it is not possible to have package with a nil name.
> If we would not rely on this contract, we would start to sprinkle "ifNil" checks all over the place. That's not a good style. It produces code that is difficult to maintain because nil has no specific domain.

I had presumed #category:matches: and #packageOfSystemCategory:ifNone:
had the same contract for systemCategory, so matched
#packageOfSystemCategory:ifNone: to also allow nil.

Listing of 'PackageOrganizer default packages':::

a PackageInfo(ConfigurationOfGofer)
a PackageInfo(SMBase)
a PackageInfo(Help-Squeak-Project)
a PackageInfo(Metacello-Base)
a PackageInfo(ST80Tests)
a PackageInfo(Monticello)
a PackageInfo(FFI-Libraries)
a PackageInfo(Files)
a PackageInfo(SUnit)
a PackageInfo(ToolBuilder-SUnit)
a PackageInfo(Metacello-Help)
a PackageInfo(ToolBuilder-Tests)
a PackageInfo(FFI-CallbacksTests)
a PackageInfo(Protocols)
a PackageInfo(Sound)
a PackageInfo(EToys)
a PackageInfo(PreferenceBrowser)
a PackageInfo(TrueType)
a MCMockPackageInfo(MonticelloMocks)
a PackageInfo(Tests)
a PackageInfo(Graphics)
a PackageInfo(MorphicTests)
a PackageInfo(ConfigurationOfMetacello)
a PackageInfo(ToolBuilder-Morphic)
a PackageInfo(MonticelloForTraits)
a PackageInfo(SqueakSSL-SMTP)
a PackageInfo(System)
a PackageInfo(Metacello-Bitbucket)
a PackageInfo(MultilingualTests)
a PackageInfo(ST80)
a PackageInfo(XML-Explorer)
a PackageInfo(Kernel)
a PackageInfo(Chronology-Core)
a PackageInfo(MonticelloFileTree-Core)
a PackageInfo(MonticelloFileTree-FileDirectory-Utilities)
a PackageInfo(VersionNumber)
a PackageInfo(KernelTests)
a PackageInfo(FFI-PoolsTests)
a PackageInfo(Help-Squeak-SWiki)
a PackageInfo(Balloon)
a PackageInfo(Collections)
a PackageInfo(VersionNumberTests)
a PackageInfo(SMLoader)
a PackageInfo(STON-Text support)
a PackageInfo(Network)
a PackageInfo(XML-Parser)
a PackageInfo(SqueakSSL-Core)
a PackageInfo(Metacello-GitBasedRepository)
a PackageInfo(SystemChangeNotification-Tests)
a PackageInfo(FFI-Callbacks)
a PackageInfo(MonticelloConfigurations)
a PackageInfo(CollectionsTests)
a PackageInfo(Compression)
a PackageInfo(Metacello-FileTree)
a PackageInfo(MorphicExtrasTests)
a PackageInfo(FFI-Kernel)
a PackageInfo(ToolBuilder-MVC)
a PackageInfo(GetText)
a PackageInfo(WebClient-Core)
a PackageInfo(Compiler)
a PackageInfo(Autogenerated )
a PackageInfo(Installer-Core)
a PackageInfo(Squeak-Version)
a PackageInfo(Regex-Core)
a PackageInfo(Help-Squeak-TerseGuide)
a PackageInfo(BaselineOfSton)
a PackageInfo(Traits)
a PackageInfo(TraitsTests)
a PackageInfo(Gofer-Core)
a PackageInfo(NetworkTests)
a PackageInfo(Chronology-Tests)
a PackageInfo(PackageInfo-Base)
a PackageInfo(Multilingual)
a PackageInfo(60Deprecated)
a PackageInfo(WebClient-Help)
a PackageInfo(Regex-Tests-Core)
a PackageInfo(WebClient-HTTP)
a PackageInfo(FFI-Tools)
a PackageInfo(GraphicsTests)
a PackageInfo(WebClient-Tests)
a PackageInfo(ShoutCore)
a PackageInfo(SqueakSSL-Tests)
a PackageInfo(Services-Base)
a PackageInfo(Metacello-Cypress)
a PackageInfo(Help-Squeak-CorePackages)
a PackageInfo(BaselineOfMetacello)
a PackageInfo(MorphicExtras)
a PackageInfo(Environments)
a PackageInfo(OSProcess)
a PackageInfo(BaselineOfFileTree)
a PackageInfo(Metacello-Platform)
a PackageInfo(ConfigurationOfHelpSystem)
a PackageInfo(SUnitGUI)
a PackageInfo(ReleaseBuilder)
a PackageInfo(FFI-Tests)
a PackageInfo(FFI-Pools)
a PackageInfo(ShoutTests)
a PackageInfo(SystemReporter)
a PackageInfo(UpdateStream)
a PackageInfo(Metacello-MC)
a PackageInfo(ConfigurationOfFFI)
a PackageInfo(Metacello-GitHub)
a PackageInfo(ST80Tools)
a PackageInfo(ToolsTests)
a PackageInfo(HelpSystem-Tests)
a PackageInfo(STON-Core)
a PackageInfo(HelpSystem-Core)
a PackageInfo(CommandLine)
a PackageInfo(Tools)
a PackageInfo(SUnitTools)
a PackageInfo(Nebraska)
a PackageInfo(ConfigurationOfFileTree)
a PackageInfo(BalloonTests)
a PackageInfo(CommandShell)
a PackageInfo(STON-Tests)
a PackageInfo(ToolBuilder-Kernel)
a PackageInfo(Morphic)
a PackageInfo(Metacello-ToolBox)
a PackageInfo(Metacello-Core)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220326/ab677d18/attachment.html>

More information about the Squeak-dev mailing list