[squeak-dev] Re: Splitting an existing package

Frank Shearar frank.shearar at gmail.com
Wed Jul 17 05:58:41 UTC 2013


On 17 July 2013 03:54, David T. Lewis <lewis at mail.msen.com> wrote:
> I'm not sure which is the better approach, but I do know that splitting
> a package into subpackages can be confusing for someone browsing the
> repository and trying to figure out what packages to load. For that reason
> I would be inlined to favor Chris' suggestion.
>
> I learned this the hard way by splitting OSProcess into sub-packages. It
> seemed like a good idea at the time, but all it does is clutter up the
> repository and make it harder for people to figure out what to load. Oops.

Ah, but OSProcess has the luxury of being on _top_ of the maze of
twisty cyclic dependencies, all alike!

frank

> Dave
>
> On Tue, Jul 16, 2013 at 07:19:46PM -0500, Chris Muller wrote:
>> Why should Files depend on anything in Compression?  The image I'm in
>> now reveals just two puny little methods causing Files to depend on
>> Compression.
>>
>> If you move CompressedSourceStream to Compression (hey that makes
>> sense!), as well as FileStream class>>#fileIn:, then we could be rid
>> of the cycle that way.
>>
>>
>>
>>
>> On Tue, Jul 16, 2013 at 6:52 PM, Chris Cunningham
>> <cunningham.cb at gmail.com> wrote:
>> > So, after step 1, you also need to hunt down the various extensions - in
>> > FileStream and other places - that is part of the Compression package, and
>> > move them to one of the new packages.  Otherwise you innadvertantly remove
>> > those methods.  (Currently all of these are just under *Compression - no
>> > sub-category...)
>> >
>> > -Chris
>> >
>> >
>> > On Tue, Jul 16, 2013 at 2:39 PM, Frank Shearar <frank.shearar at gmail.com>
>> > wrote:
>> >>
>> >> On 16 July 2013 22:30, Frank Shearar <frank.shearar at gmail.com> wrote:
>> >> > I would like to split the Compression package into its two constituent
>> >> > subpackages, Compression-Archives and Compression-Streams.
>> >> >
>> >> > Files depends on things in Compression-Archives, and
>> >> > Compression-Streams depends on Files. If I can split the package and
>> >> > replace it with the two subpackages, I can untangle this cyclic
>> >> > dependency.
>> >> >
>> >> > But how would I actually do this? I've tried making two packages, for
>> >> > instance. However, the classes still remain in Compression... as you
>> >> > can see if you try to unload the old Compression package.
>> >>
>> >> One possible way goes something like this:
>> >> * Add CompressionArchives and CompressionStream packages corresponding
>> >> to the hyphenated system categories
>> >> * Push a new config map with the "new" packages
>> >> * Push the empty Compression package
>> >> * Remove the Compression package using a config map
>> >> * Rename CompressionArchives to Compression-Archives and same for Stream
>> >> * Push a third config map removing Compression and adding
>> >> Compression-Archives and Compression-Stream
>> >>
>> >> > frank
>> >>
>> >
>> >
>> >
>> >
>


More information about the Squeak-dev mailing list