Mantis - Squeak
Viewing Issue Advanced Details
7239 Kernel minor always 12-03-08 21:33 12-27-09 19:08
0007239: Refactoring Accesses to SourceFiles
Slowly but surely refactor changes to SourceFiles ready for some better scheme
related to 0005205resolved  Versions, sources, and changes. Repairing the current system to eliminate limitations. 
 SystemDictionary.1.cs [^] (2,823 bytes) 12-04-08 03:36
 Sources.4.cs [^] (20,036 bytes) 12-04-08 21:45

12-03-08 21:36   
Sources.1.cs - Refactoring of classComment:stamp:
Sources.4.cs - moves sources/changes housekeeping out of SystemDictionary
SystemDictionary.1.cs - allClassesDo: allTraitsDo: refactor to use iterators more widely

"fix begin"
Installer mantis bug: 7239 fix: 'Sources.4.cs'.
Installer mantis bug: 7239 fix: 'SystemDictionary.1.cs'.
"fix end"

12-05-08 05:03   
Hi Keith,

Can you explain what your changes do?

And the context which made you decide the changes were necessary?

I ask from both curiosity and worry.

You are touching some fundamental stuff. And the chances of breaking things are great. Others need and deserve to understand that what you are doing is sound.

Also, I ask my usual request for tests that fail before the change and pass afterwards.

I know you are one of the few willing to take on and change core things that need changing. Please bring others into your thinking. It will help later..

Cheers, -Jer
12-05-08 05:05   
I've downloaded your patches but its too late right now to give them a proper think. I will do that later.

Yours in curiosity and service, --Jerome Peace
12-05-08 17:41   
JP I agree with you for the most part.
The reason:
For an object oriented system, the concept of encapsulation, data hiding, and modularity appears to have completely escaped any reference to SourceFiles.
The plan: (ish)
1. SourceFiles replace with SourceFilesArray current.
Later rename SourceFileArray to SourceFiles, in place of the existing Global Sourcefiles.
2. The whole SourceFiles subsystem should be an module, for unloading, or replacing.
2a. Example Use Case: If FileDirectory was removed from the image and replaced with Rio's File/Directory then a new RioBasedSourceFilesArray should be easily switched in/out.
Second use case: I keep hitting that 32Mb changes file limit.
3. Currently looking at references to SourceFiles (58)
4. References to RemoteString, remote string should be essentially internal to the SourceFileModule. isKindOf: RemoteString should be replaced with an interface #isRemoteString
5. Testing: as ususual I have no idea how to test this. If you break things, then you possibly cant fix them because you have broken things. This means that a failing test may be a little bit late. Therefore there is no substitute for careful coding. After step 1, we could temporarily switch SourceFilesArray current to a test fixture rather than the real thing. This is a technique that Rio uses to test Dos filesystems on a unix box and vice versa.
6. Now we have atomic loading, this is potentially loadable without breaking everything, so the sooner we start work on it, the sooner we get to know the issues.

12-27-09 19:08   
This issue has been superceded by recent development in Squeak trunk, and should probably be closed. Change sets for the Squeak trunk changes are in related Mantis issue 5205.