'From Pharo-1.1.1-- of 12 September 2010 [Latest update: #11414] on 21 July 2011 at 8:04:01 am'! Object subclass: #Migrate instanceVariableNames: 'packageCache homeGrownPackages localOnly log' classVariableNames: '' poolDictionaries: '' category: 'Migrate-Core'! !Migrate commentStamp: 'BillSchwab 1/12/2010 19:00' prior: 0! Another gratuitous loader. CONFIGURE ========= Configure it using #homeGrownPackageNames and #me to tell it which packages are intended to hold your work, and how to identify you from the (misnomer!!!!!!) #timeStamp aspects of the compiled methods you produce. SAVE YOUR WORK ============== Use #suspectMethodsReport to produce a listing of class>>selector names that might be in danger of being orphaned in your current image. Use #homeGrownPackgesSaveWithMessage: to save all of the identified home grown packages in the next version and with the common text message. BUILD A NEW IMAGE ================= Load Migrate into a new image. If you want a web image, evaluate #web and then save the image. It wants underscore_madness.cs, and loads SIXX and other packages of interest to me; you can edit as needed to remove what you do not want to load. Put your packages in the cache directory for the new image. Yes, it is fussy about these things, but the idea is to find errors early rather than being stopped after a long wait. Likewise, if you do not like what #setPreferences does, edit it. W.K. Schwab, Ph.D. This is released under standard Pharo licensing with no warranty of any kind. ! !Migrate methodsFor: 'helpers' stamp: 'BillSchwab 3/6/2011 12:01'! basicLoadPackages "10-09 - load lots of code, some from the local cache, some from elsewhere. 11-09 - finding a need to enforce local-only loads. source.squeakfoundation.org is today's (re FFI) offender, but it is a generic weakness that needs attention." | wks | wks := packageCache. "10-10 - hassles. SIXX at least would not previously load without _ abuse; turn this on here and gag it later so serial port settings can loal" Scanner allowUnderscoreAsAssignment:true. "ScriptLoader loadLatestPackage:'' from:'ftp://swikis.ddo.jp/SIXX/squeak/SIXX20091024.sar'. SARInstaller installSAR:'package-cache/SIXX20091115.sar'. 3-11" self loadSIXX. localOnly ifTrue:[ #( 'FFI-Kernel' 'FFI-Tests' 'FFI-Examples' ) do:[ :each | self loadLatestPackage:each fromRepository:wks. ]. ] ifFalse:[ self loadFFI. ]. "Command shell requires proceeding past warnings and THEN commenting out/proceedingpast the last line in #initize - aka it's broke." localOnly ifTrue:[ self loadLatestPackage:'OSProcess' fromRepository:wks; loadLatestPackage:'CommandShell' fromRepository:wks. ] ifFalse:[ self loadOSProcess. "6-10 - still troubles loading it" self loadOSProcessCommandShell. ]. "4-10 - ConfigurationOfCitezen appears to load Seaside, so do this early now." self loadCitezen. "ODBC: http://www.squeaksource.com/ODBC/ODBC-rjl.10.mcz. 11-09 - more local-only room to grown, but squeaksource is not down right now." self loadLatestPackage:'ODBC' fromSqueaksource:'ODBC'; loadLatestPackage:'LDAP' fromSqueaksource:'LDAPlayer'. self loadLatestPackage:'SIF-Support' fromRepository:wks; loadLatestPackage:'SIF-Squeak' fromRepository:wks. "10-10 - hassles." Scanner allowUnderscoreAsAssignment:false. "4-10 - hopefully ConfigurationOfCitezen will handle this now?? Rio is broken on Windows (kinda fitting, actually). Go to #newForWin32 and add #new. loadLatestPackage:'Rio-Kernel' fromSqueaksource:'Rio'; loadLatestPackage:'Rio-Grande' fromSqueaksource:'Rio'." "10-09 - note the trick of looking for CZLoader by name to avoid a dependency on as-yet not loaded code. self loadCitezen." "11-09 - factor out the names that should contain methods that are *not* in danger of being lost for want of packaging. 10-10 - trying to load Migrate, which belongs in the list for suspect methods search and not here.." self homeGrownPackages allButFirst do:[ :each | self log:each packageName. self loadLatestPackage:each packageName fromRepository:wks. ] displayingProgress:'Loading Home-grown Packages'. ! ! !Migrate methodsFor: 'helpers' stamp: 'BillSchwab 4/15/2010 17:05'! checkHomeGrownPackagesForLoad "11-09 - look for existing versions of all named packages - in short, don't blow up over stupid stuff _after_ installing a bunch of code." self homeGrownPackages. self homeGrownPackages allButFirstDo:[ :each | self assert:[ ( self versionsAvailableForPackage:( PackageInfo named:each packageName ) in:packageCache ) notEmpty ]. ]. " Migrate default checkHomeGrownPackagesForLoad. Migrate default checkHomeGrownPackagesForSave. " ! ! !Migrate methodsFor: 'helpers' stamp: 'BillSchwab 11/3/2009 20:11'! checkHomeGrownPackagesForSave "11-09 - a breif sanity check on the packages; at least see if they contain some methods. A method-less class won't like this, but I'm losing way too much time to avoidable non-sense for want of a real package system; this should slow the bleeding." self homeGrownPackages. self homeGrownPackages do:[ :each | self assert:[ each methods notEmpty ]. ]. " Migrate new checkHomeGrownPackagesForLoad. Migrate new checkHomeGrownPackagesForSave. " ! ! !Migrate methodsFor: 'helpers' stamp: 'BillSchwab 1/12/2010 19:15'! homeGrownPackageFor:method ifNone:ifNone "11-09 - starting to understand why OB is so slow; there appears to be no direct path from method to package." | selector aClass | selector := method selector. aClass := method methodClass. "11-09 - try to luck out and early out method methodClass methods includes:method." ^homeGrownPackages detect:[ :aPackage | aPackage includesMethod:selector ofClass:aClass. "method category. method methodClass." ] ifNone:ifNone. ! ! !Migrate methodsFor: 'helpers' stamp: 'BillSchwab 10/3/2010 22:17'! homeGrownPackages "11-09 - answer a collection of packages allegedly representing the work of the programmer identified by #me. Add the Migrate package as the first in the collection; it is skipped using #allButFirstDo: in various places." | aClass | homeGrownPackages notNil ifTrue:[ ^homeGrownPackages. ]. homeGrownPackages := ( self homeGrownPackageNames collect:[ :each | "11-09 - can't do this here; sometimes we care about whole packages in the images, and sometimes about extant versions in the cache. See #checkHomeGrownPackagesFor*. self assert:[ PackageInfo existPackageNamed:each. ]." PackageInfo named:each. ] ) asOrderedCollection. "11-09 - lots of bogus complaints over Migrate members, so add it to the collection of packages. This allows the search for endangered work to include migrate and all subclass' packages, while leaving them out of #homeGrownPackageNames which is used to load the packages into the new image. Migrate and friends are loaded separately, so should not be loaded again. 1-10 - with Migrate-Core, etc., just add Migrate's package. aClass := self class. [ aClass notNil ] whileTrue:[ homeGrownPackages addFirst:aClass package. aClass := aClass = Migrate ifTrue:[ nil. ] ifFalse:[ aClass superclass. ]. ]. homeGrownPackages addFirst:Migrate package." "9-10 - this is being a pain again - try adding the receiver (presumably not a Migrate) to the collection. 10-10 - this is being a major pain. Give it one more chance. homeGrownPackages addFirst:self class package; addFirst:Migrate package." homeGrownPackages first = self class package ifFalse:[ homeGrownPackages addFirst:self class package. ]. ^homeGrownPackages. " Migrate default homeGrownPackages. " ! ! !Migrate methodsFor: 'helpers' stamp: 'BillSchwab 1/12/2010 19:12'! initialize super initialize. packageCache := MCCacheRepository default. self homeGrownPackages. localOnly := false. log := LogFile fileName:'migrate.log'. " Migrate default suspectMethodsReport. Migrate default homeGrownPackagesSaveWithMessage:'Automated save'. Do this and then save the image!! Migrate default web. Migrate default loadPackages. Migrate default loadPackagesLocalOnly. " ! ! !Migrate methodsFor: 'helpers' stamp: 'BillSchwab 11/2/2009 23:12'! isHomeGrown:method ^( method timeStamp indexOfSubCollection:self me ) ~= 0 ! ! !Migrate methodsFor: 'helpers' stamp: 'BillSchwab 1/16/2010 18:22'! loadLatestPackage: aString from: url | repository | repository := MCHttpRepository location:url user: '' password: ''. self loadLatestPackage: aString fromRepository: repository. ! ! !Migrate methodsFor: 'helpers' stamp: 'BillSchwab 1/16/2010 18:20'! loadLatestPackage: aString fromRepository: aRepository "1-10 - too useful to be without really, I created another. Shamelessly stolen from ScriptLoader." | versionsBlock versions tries version | versionsBlock := [ (aRepository allVersionNames select: [ :each | each beginsWith: aString ]) asSortedCollection: [ :a :b | (a copyAfterLast: $.) asNumber <= (b copyAfterLast: $.) asNumber]]. versions := versionsBlock value. tries := 0. [ versions isEmpty and: [ tries < 3 ] ] whileTrue: [ versions := versionsBlock value. tries := tries + 1 ]. versions isEmpty ifTrue: [ self error: 'problems when accessing repository' ]. aRepository versionReaderForFileNamed: (versions last , '.mcz') do: [:reader | version := reader version. version load. version workingCopy repositoryGroup addRepository: aRepository]. ! ! !Migrate methodsFor: 'helpers' stamp: 'BillSchwab 1/16/2010 18:23'! loadLatestPackage: aString fromSqueaksource: aDirectoryName " self loadLatestPackage: 'ScriptLoader' fromSqueaksource: 'Pharo' " self loadLatestPackage: aString from: 'http://www.squeaksource.com/', aDirectoryName ! ! !Migrate methodsFor: 'helpers' stamp: 'BillSchwab 7/11/2011 10:49'! loadMetacelloPackage:name version:versionStringOrNil "1-10 - way too much sugar" | aGofer fullName config project tryThese | fullName := name. ( fullName beginsWith:'ConfigurationOf' ) ifFalse:[ fullName := 'ConfigurationOf', fullName. ]. "1-10 - now multiple messages to the same configuration (which makes sense)" Smalltalk at:fullName asSymbol ifAbsent:[ Gofer new squeaksource:'MetacelloRepository'; package:fullName; load. ]. config := Smalltalk at:fullName asSymbol. project := config project. "7-11 - configs load differently every time - try to make one thing that can work." tryThese := { [config load. ]. [ project stableVersion load. ]. [ project latestVersion load. ]. }. versionStringOrNil isNil ifTrue:[ "7-11 - can this mask complexities? Consider also #canUnderstand: config load." tryThese detect:[ :each | [ each value. true. ] on:Error do:[ :e | false. ]. ]. ] ifFalse:[ ( config project version:versionStringOrNil ) load. ]. ! ! !Migrate methodsFor: 'helpers' stamp: 'BillSchwab 7/10/2011 13:37'! loadMetacelloPackageLatest:name version:versionString "1-10 - way too much sugar; too little polymorphism 7-11 - NOT USED" | aGofer fullName config | fullName := name. ( fullName beginsWith:'ConfigurationOf' ) ifFalse:[ fullName := 'ConfigurationOf', fullName. ]. "1-10 - now multiple messages to the same configuration (which makes sens)" Smalltalk at:fullName asSymbol ifAbsent:[ Gofer new squeaksource:'MetacelloRepository'; package:fullName; load. ]. config := Smalltalk at:fullName asSymbol. versionString isNil ifTrue:[ config latestVersion load. ] ifFalse:[ ( config project latestVersion:versionString ) load. ]. ! ! !Migrate methodsFor: 'helpers' stamp: 'BillSchwab 11/11/2009 14:14'! log:aString log log:aString. ! ! !Migrate methodsFor: 'helpers' stamp: 'BillSchwab 11/9/2009 17:23'! preLoad "10-09 - hooks for things to do before loadling packages." ! ! !Migrate methodsFor: 'helpers' stamp: 'BillSchwab 1/12/2010 19:16'! savePackageNamed:packageName message:aString "11-09 - Saving packages one-off using MC is error prone, not to mention just plain pointless. Save the next version of each of the home grown packages using a common message." | wc version | wc := ( MCPackage named:packageName ) workingCopy. version := wc newVersionWithName:wc uniqueVersionName message:aString. packageCache storeVersion:version. " Migrate default homeGrownPackagesSaveWithMessage:'Automate this'. " ! ! !Migrate methodsFor: 'helpers' stamp: 'BillSchwab 10/3/2010 21:45'! setPreferences "Set toolset, fonts, theme; turn off ecompletion." | tinyFont codeFont baseFont boldFont | "10-10 - the new inspector is back - nuke it." ToolSet default:StandardToolSet. SystemBrowser default:Browser. UIThemeW2K beCurrent. "Select Fonts - Shamelessly stolen from Lukas tinyFont := LogicalFont familyName:'DejaVu Sans' fallbackFamilyNames:nil pointSize:8 stretchValue:0 weightValue:400 slantValue:0. codeFont := LogicalFont familyName:'DejaVu Sans Mono' fallbackFamilyNames:nil pointSize:9 stretchValue:0 weightValue:400 slantValue:0. baseFont := LogicalFont familyName:'DejaVu Sans' fallbackFamilyNames:nil pointSize:10 stretchValue:0 weightValue:400 slantValue:0. boldFont := LogicalFont familyName:'DejaVu Sans' fallbackFamilyNames:nil pointSize:11 stretchValue:0 weightValue:600 slantValue:0. Preferences setBalloonHelpFontTo:tinyFont. Preferences setButtonFontTo:baseFont. Preferences setCodeFontTo:codeFont. Preferences setHaloLabelFontTo:baseFont. Preferences setListFontTo:baseFont. Preferences setMenuFontTo:baseFont. Preferences setSystemFontTo:baseFont. Preferences setWindowTitleFontTo:boldFont." Preferences disable:#ecompletionEnabled; disable:#autoFocusForColumns; enable:#fastDragWindowForMorphic; setPreference:#browserWindowColor toValue:( Color r:0.533 g:0.753 b:0.976 ). "11-09 - per os process. 10-10 - no help anymore; had to use settings to gag the FFI installation warnings. Preferences disable:#showDeprecationWarnings." ! ! !Migrate methodsFor: 'helpers' stamp: 'BillSchwab 1/12/2010 19:16'! suspectMethods "11-09 - answer a collection of methods authored (per #timeStamp - misnamed!!!!) by 'me' and not in one of the #homeGrownPackages. Look for them now, or look for them later." | out | out := Array writeStream. self homeGrownPackages. ProtoObject allSubclasses do:[ :aClass | aClass methods do:[ :method | ( self isHomeGrown:method ) ifTrue:[ "11-09 - written here. Is it packaged in kind?" self homeGrownPackageFor:method ifNone:[ out nextPut:method. ]. ]. ]. ] displayingProgress:'Looking for unpackaged code'. ^out contents. " Migrate default suspectMethods. " ! ! !Migrate methodsFor: 'configuration' stamp: 'BillSchwab 11/11/2009 11:30'! homeGrownPackageNames "Override to answer a collection of package names to be overseen by Migrate. These are the 'home-grown' packages used in #suspectMethods (looking for work that would be lost for want of packaging), saved by #homeGrownPackagesSaveWihMessage:, and loaded into a new image as part of #loadPackages." ^OrderedCollection new. ! ! !Migrate methodsFor: 'configuration' stamp: 'BillSchwab 11/7/2009 14:09'! me "Answer a string to be found in the (yuk!!!!) #timeStamp of methods that represent work to be saved in packages." self shouldBeImplemented. ! ! !Migrate methodsFor: 'save packages' stamp: 'BillSchwab 10/3/2010 22:22'! homeGrownPackagesSaveWithMessage:aString "11-09 - Save the 'next version' of each of the home-grown packages." "11-09 - undone work is the most common cause of hassle here, so do some type of check on the integrity of the packages. Is having methods enough?" self checkHomeGrownPackagesForSave. self homeGrownPackages allButFirst do:[ :each | self savePackageNamed:each packageName message:aString. ] displayingProgress:'Saving Home-grown Packages'. " Migrate default homeGrownPackagesSaveWithMessage:'6-10 - hoping for Seaside 3.0 (1.1 RC1) image.'. " ! ! !Migrate methodsFor: 'save packages' stamp: 'BillSchwab 7/2/2011 12:13'! saveMigrate "11-09 - typical usage will likely be to subclass Migrate, so saving it and all sub-class' packages will be helpful. 1-10 - changing to Migrate-Core, etc., so it should suffice to save only Migrate's package." "1-10 Migrate withAllSubclasses do:[ :aClass | self savePackageNamed:aClass package packageName message:'Migrate'. ]." self savePackageNamed:Migrate package packageName message:'Migrate'. " Migrate default saveMigrate. Migrate default homeGrownPackagesSaveWithMessage:'For building a 1.3 image'. Migrate default homeGrownPackagesSaveWithMessage:'For building a 1.1.1 image'. " ! ! !Migrate methodsFor: 'build image basics' stamp: 'BillSchwab 1/16/2010 18:29'! loadAlien "1-10 - load FFI if not installed." Smalltalk at:#Alien ifPresent:[ :aClass | ^self. ]. self loadMetacelloPackage:'Alien' version:nil. ! ! !Migrate methodsFor: 'build image basics' stamp: 'BillSchwab 7/10/2011 21:24'! loadCitezen "1-10 - load Citezen if not installed. 4-10 - this appears to load Seaside too. 6-10 - will no longer load Seaside." Smalltalk at:#ConfigurationOfCitezen ifPresent:[ :aClass | ^self. ]. Gofer new squeaksource: 'Citezen'; package: 'ConfigurationOfCitezen'; load. "6-10 - convenient class method to load just the parsers. ( (Smalltalk at:#ConfigurationOfCitezen ) project latestVersion: #development) load." ( Smalltalk at:#ConfigurationOfCitezen ) loadNoWeb. "At this point the base stuff is installed. To get the Seaside and HTML generation: 4-10 - wks - suspect this is a poor time to do this; worried about Seaside installation. ( Smalltalk at:#CZLoader ) loadWithSeaside." " Migrate default loadCitezen. Migrate default loadOSProcess. Migrate default loadSeaside. " ! ! !Migrate methodsFor: 'build image basics' stamp: 'BillSchwab 7/10/2011 16:09'! loadFFI "1-10 - load FFI if not installed." Smalltalk at:#ExternalStructure ifPresent:[ :aClass | ^self. ]. "7-11 - self loadMetacelloPackage:'FFI' version:'1.2'." self loadMetacelloPackage:'FFI' version:nil. " Migrate default loadFFI. " ! ! !Migrate methodsFor: 'build image basics' stamp: 'BillSchwab 7/15/2011 17:58'! loadMagritte Gofer new squeaksource: 'MetacelloRepository'; package: 'ConfigurationOfMagritte2'; load. ( Smalltalk at:#ConfigurationOfMagritte2 ) project latestVersion load. ! ! !Migrate methodsFor: 'build image basics' stamp: 'BillSchwab 4/15/2010 15:05'! loadOSProcess "1-10 - load OS Process if not installed." Smalltalk at:#ConfigurationOfOSProcess ifPresent:[ :aClass | ^self. ]. self loadMetacelloPackage:'OSProcess' version:nil. " Migrate default loadOSProcess. " ! ! !Migrate methodsFor: 'build image basics' stamp: 'BillSchwab 4/15/2010 17:43'! loadOSProcessCommandShell "1-10 - load OS Process if not installed." "4-10 - this is getting old. Smalltalk at:#ConfigurationOfOSProcess ifPresent:[ :aClass | ^self. ]." self loadLatestPackage:'CommandShell' fromSqueaksource:'CommandShell'. " Migrate default loadOSProcessCommandShell. " ! ! !Migrate methodsFor: 'build image basics' stamp: 'BillSchwab 7/15/2011 17:57'! loadSeaside Smalltalk at:#WAComponent ifPresent:[ :aClass | ^self. ]. Gofer new squeaksource: 'MetacelloRepository'; package: 'ConfigurationOfSeaside30'; load. ( Smalltalk at:#ConfigurationOfSeaside30 ) project latestVersion load. "7-11 - configurations work differently every time... ( Smalltalk at:#ConfigurationOfSeaside ) project latestVersion load: 'Seaside 3.0 Examples'. ( Smalltalk at:#ConfigurationOfSeaside ) project latestVersion load: 'Magritte'. ( Smalltalk at:#ConfigurationOfSeaside ) project latestVersion load: 'Magritte Tests'. " ! ! !Migrate methodsFor: 'build image basics' stamp: 'BillSchwab 7/10/2011 16:10'! loadSeaside28 "7-11 - move to 3.0?" Smalltalk at:#WAComponent ifPresent:[ :aClass | ^self. ]. "1-10 self loadMetacelloPackage:'Seaside28' version:'2.8.4.2'. self loadMetacelloPackageLatest:'Seaside' version:'Seaside 2.8'; loadMetacelloPackageLatest:'Seaside' version:'Magritte'." Gofer new squeaksource: 'MetacelloRepository'; package: 'ConfigurationOfSeaside'; load. ( Smalltalk at:#ConfigurationOfSeaside ) project latestVersion load: 'Seaside 2.8'. ( Smalltalk at:#ConfigurationOfSeaside ) project latestVersion load: 'Seaside 2.8 Examples'. ( Smalltalk at:#ConfigurationOfSeaside ) project latestVersion load: 'Magritte'. ( Smalltalk at:#ConfigurationOfSeaside ) project latestVersion load: 'Magritte Tests'. ! ! !Migrate methodsFor: 'build image basics' stamp: 'BillSchwab 1/16/2010 18:32'! loadVMMaker self loadAlien. self loadFFI. "self loadMetacelloPackage:'PharoSound' version:'1.0'." Gofer new squeaksource:'VMMaker'; package: 'VMMaker'; load. ! ! !Migrate methodsFor: 'build image' stamp: 'BillSchwab 7/15/2011 18:02'! loadPackages "10-09 - build an image. I have no idea what's up with installer/gofer, etc., and now can't reliably copy text between images. MC seems to work, so create class to do all of this." self checkHomeGrownPackagesForLoad. self setPreferences. self preLoad. self basicLoadPackages. ( Smalltalk at:#ExternalStructure ) allSubclassesDo: [:each | each compileFields]. " Migrate default suspectMethodsReport. Migrate default homeGrownPackagesSaveWithMessage:'For 1.3'. Do this and then save the image!! Migrate default web. Migrate default loadPackages. Migrate default loadPackagesLocalOnly. " ! ! !Migrate methodsFor: 'build image' stamp: 'BillSchwab 1/12/2010 19:13'! loadPackagesLocalOnly "10-09 - build an image. I have no idea what's up with installer/gofer, etc., and now can't reliably copy text between images. MC seems to work, so create class to do all of this." self useOnlyLocalRepositories. self loadPackages. " Migrate default suspectMethodsReport. Migrate default homeGrownPackagesSaveWithMessage:'Automated save'. Do this and then save the image!! Migrate default web. Migrate default loadPackages. Migrate default loadPackagesLocalOnly. " ! ! !Migrate methodsFor: 'build image' stamp: 'BillSchwab 1/12/2010 19:13'! useOnlyLocalRepositories "11-09 - squeak foundation down; not the first time, won't be the last." localOnly := true. " Migrate default suspectMethodsReport. Migrate default homeGrownPackagesSaveWithMessage:'Automated save'. Do this and then save the image!! Migrate default web. Migrate default loadPackages. Migrate default loadPackagesLocalOnly. " ! ! !Migrate methodsFor: 'build image' stamp: 'BillSchwab 1/13/2010 18:35'! vmMaker self loadMetacelloPackage:'Alien' version:nil. self loadMetacelloPackage:'FFI' version:'1.0'. self loadMetacelloPackage:'PharoSound' version:'1.0'. Gofer new squeaksource:'VMMaker'; package: 'VMMaker'; load. ! ! !Migrate methodsFor: 'build image' stamp: 'BillSchwab 7/15/2011 17:58'! web "1-10 - no more web images. Get rid of the specifics when Loader is released. Do this first and SAVE THE IMAGE to avoid wasting time." "4-10 - try this differently. self loadSeaside; loadFFI; loadAlien; loadVMMaker. 6-10 - Citezen now separate, so load Seaside." self loadFFI; loadCitezen; loadSeaside; loadMagritte. " Migrate default suspectMethodsReport. Migrate default saveMigrate. Migrate default homeGrownPackagesSaveWithMessage:'For building 1.3'. Do this and then save the image!! Migrate default setPreferences. Migrate default web. Migrate default loadPackages. Migrate default loadPackagesLocalOnly. " ! ! !Migrate methodsFor: 'check for endangered work' stamp: 'BillSchwab 1/12/2010 19:13'! suspectMethodsReport | methods out ws | methods := self suspectMethods. out := String writeStream. out nextPutAll:'Below is a list of methods attributable to '; nextPutAll:self me; nextPutAll:' but not packaged in one of the #homeGrownPackageNames.'; cr; nextPutAll:'They might be at risk of being orphaned as you build a new image.'; cr; cr. methods do:[ :each | out nextPutAll:each methodClass name; nextPutAll:'>>'; nextPutAll:each selector. ] separatedBy:[ out cr. ]. ws := Workspace new contents:out contents. ws openLabel:'Suspect Methods'. " Migrate default suspectMethodsReport. " ! ! !Migrate methodsFor: 'as yet unclassified' stamp: 'BillSchwab 3/6/2011 12:01'! loadSIXX "3-11 - metacello configuration available." "3-11 - previously, this was done as: SARInstaller installSAR:'package-cache/SIXX20091115.sar'. " Gofer new squeaksource:'MetacelloRepository'; package:'ConfigurationOfSIXX'; load. (Smalltalk at:#ConfigurationOfSIXX) load. ! ! !Migrate methodsFor: 'as yet unclassified' stamp: 'BillSchwab 4/15/2010 17:05'! versionsAvailableForPackage: aPackage in:repository "4-10 - stolen/adapted from O2." ^repository allVersionNames select: [:versionName | versionName beginsWith: aPackage packageName] ! ! "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "! Migrate class instanceVariableNames: ''! !Migrate class methodsFor: 'as yet unclassified' stamp: 'BillSchwab 1/12/2010 19:08'! default "1-10 - cheat to allow subclasses to be automatically detected and used; works with one and only one subclass." | classes | classes := Migrate allSubclasses asOrderedCollection. self assert:[ classes size = 1. ]. ^classes first new. ! ! !Migrate class methodsFor: 'as yet unclassified' stamp: 'BillSchwab 8/31/2010 17:05'! packageNamesStartingWith:aString ^( PackageOrganizer default packageNames select:[ :each | each beginsWith:aString. ] ) asOrderedCollection. " Migrate packageNamesStartingWith:'Dolphincompat'. ( Migrate packageNamesStartingWith:'Dolphincompat' ) do:[ :each | PackageOrganizer default unregisterPackageNamed:each. ]. " ! !