Mantis - Squeak
Viewing Issue Advanced Details
3434 System major always 04-06-06 00:10 07-20-06 10:45
none 3.9  
0003434: Smalltalk condenseSources broken
Needs the attached fix, but beware of 0003433
related to 0003433closed MarcusDenker MultiByteFileStream screws up default text converter if file name = sources name 
 CondenseSources.1.cs [^] (1,996 bytes) 04-06-06 00:11

04-30-06 19:25   
Hi andreas

what do you mean exactly?
that this is a fix for condense changes
but not really fix the deep root of the problem?

04-30-06 19:33   
I checked with the 39.7025 code and the 39 code takes into account the traits in the process.
Beside that I do not see the difference (I should check in 3.8 to see the changes).

Here is the 3.9 code

    "Move all the changes onto a compacted sources file."
    "Smalltalk condenseSources"

    | f dir newVersionString count |
    Utilities fixUpProblemsWithAllCategory.
    "The above removes any concrete, spurious '-- all --' categories, which mess up the process."
    dir := FileDirectory default.
    newVersionString := UIManager default request: 'Please designate the version
for the new source code file...' initialAnswer: SmalltalkImage current sourceFileVersionString.
    newVersionString ifNil: [^ self].
    newVersionString = SmalltalkImage current sourceFileVersionString ifTrue:
        [^ self error: 'The new source file must not be the same as the old.'].
    SmalltalkImage current sourceFileVersionString: newVersionString.

    "Write all sources with fileIndex 1"
    f := FileStream newFileNamed: SmalltalkImage current sourcesName.
    f header; timeStamp.
'Condensing Sources File...'
    displayProgressAt: Sensor cursorPoint
    from: 0 to: self classNames size + self traitNames size
        [:bar | count := 0.
        Smalltalk allClassesAndTraitsDo:
            [:classOrTrait | bar value: (count := count + 1).
            classOrTrait fileOutOn: f moveSource: true toFile: 1]].
    f trailer; close.

    "Make a new empty changes file"
    SmalltalkImage current closeSourceFiles.
    dir rename: SmalltalkImage current changesName
        toBe: SmalltalkImage current changesName , '.old'.
    (FileStream newFileNamed: SmalltalkImage current changesName)
        header; timeStamp; close.
    SmalltalkImage current lastQuitLogPosition: 0.

    self setMacFileInfoOn: SmalltalkImage current changesName.
    self setMacFileInfoOn: SmalltalkImage current sourcesName.
    SmalltalkImage current openSourceFiles.
    self inform: 'Source files have been rewritten!
Check that all is well,
and then save/quit.'
05-01-06 00:30   
I mean precisely what the subject says, namely that condenseSources is broken. There are/were two problems, one that requires the fix here the other one reported in 0003433. If you think it's been solved, just run condenseSources and if everythng is fine afterwards, good.
07-20-06 10:45   
this (SmalltalkImage vs. Smalltalk) has already been fixed