I was taking a swing at fixing the FileBrowser bug caused by the non-existence of st.cs.uiuc.edu wherein we get a very annoying loop of notifiers and a hard time trying to get out of them. Looking around the related code suggests we really want to clean up a lot of methods to do with serverdirectory, ftpurl etc.
The error handling bug is quite simple to trigger for you pleasure and amusement (I'm past being amused by it and have gone around enough times that I think I can no longer see the wood for the trees)
NetNameResolver addressForName: 'st.cs.uiuc.edu' timeout: 10.
should do it for you.
The problem is that we get to NameLookupFailure>defaultAction (because there is no other handler), which uses a UI to ask if the user wants to try again (sigh; raising a UI from a system error...) and if the option to retry is picked then it sends #restart to the handlerContext - which is not set. So far as I can see handlerContext only gets set by sending #privHandlerContext: which is only done just *after* the code that we just ran to get into trouble. With no set handlerContext we're also in trouble if we want to #pass, #return: or even just query #isNested.
If we use a 'deliberate' handler it works as one might hope
[NetNameResolver addressForName: 'st.cs.uiuc.edu' timeout: 10] on: NameLookupFailure do:[:ex| ex pass].
So, maybe an edge case that got over-optimised? Like I said, my brain is now useless for this and it needs another set of eyes.
tim
--
tim Rowledge; tim(a)rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: FSRA: Forms Skip and Run-Away
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.1209.mcz
==================== Summary ====================
Name: Kernel-eem.1209
Author: eem
Time: 2 January 2019, 6:30:39.793608 pm
UUID: 5524e880-035b-4429-a52f-72f66eb53756
Ancestors: Kernel-eem.1208
Provide a method that answers the nested block methods in a method compiled with full blocks. This is somewhat similar to embeddedBlockClosures, but answers the CompiledBlock methods, not representative closures around them, and does not require interpreting code, merely recursively traversing CompiledCode literals.
=============== Diff against Kernel-eem.1208 ===============
Item was added:
+ ----- Method: CompiledMethod>>nestedBlockMethods (in category 'closures') -----
+ nestedBlockMethods
+ "Answer a collection of the block methods of blocks within the receiver, if any."
+ | nestedBlockMethods iterator |
+ nestedBlockMethods := OrderedCollection new.
+ iterator := [:m| | nLits |
+ nLits := m numLiterals.
+ 2 to: (m isCompiledBlock ifTrue: [nLits] ifFalse: [nLits - 1]) do:
+ [:index | | lit |
+ lit := m objectAt: index.
+ lit isCompiledCode ifTrue:
+ [iterator value: (nestedBlockMethods add: lit)]]].
+ iterator value: self.
+ ^nestedBlockMethods
+ !
The long-gone st.cs.uiuc.edu site used to be our example of how to add a remote directory but... long-gone. Can we enable anonymous ftp access to a directory on squeak.org as a replacement? files.squeak.org might appear appropriate but seems to be locked to only http access right now.
tim
--
tim Rowledge; tim(a)rowledge.org; http://www.rowledge.org/tim
To define recursion, we must first define recursion.
Fabio Niephaus uploaded a new version of SUnit to project The Trunk:
http://source.squeak.org/trunk/SUnit-fn.114.mcz
==================== Summary ====================
Name: SUnit-fn.114
Author: fn
Time: 1 January 2019, 11:17:27.195303 pm
UUID: 1fb994c8-2dce-4fab-9142-a3e6cd4728b7
Ancestors: SUnit-eem.113
Dynamically determine delay duration that exceeds the test's timeout. This way, the test also passes on low performance VMs (see Smalltalk>>#isLowerPerformance).
=============== Diff against SUnit-eem.113 ===============
Item was changed:
----- Method: SUnitTest>>testTestTimeout (in category 'testing') -----
testTestTimeout
+ self should:[(Delay forSeconds: (self timeoutForTest + 1)) wait] raise: TestFailure.
- self should:[(Delay forSeconds: 6) wait] raise: TestFailure.
!