The Trunk: System-eem.740.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: System-eem.740.mcz

commits-2
Eliot Miranda uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-eem.740.mcz

==================== Summary ====================

Name: System-eem.740
Author: eem
Time: 29 May 2015, 4:09:46.189 pm
UUID: 53894fe9-e3f5-44c7-b4c2-101e4d72f0d3
Ancestors: System-eem.739

Modify condensSources to preserve direct method history.

=============== Diff against System-eem.739 ===============

Item was changed:
  ----- Method: SmalltalkImage>>condenseSources (in category 'housekeeping') -----
  condenseSources
  "Move all the changes onto a compacted sources file."
  "Smalltalk condenseSources"
 
  | newSourcesFile defaultDirectory newVersion currentVersion |
  Utilities fixUpProblemsWithAllCategory.
  "The above removes any concrete, spurious '-- all --' categories, which mess up the process."
  defaultDirectory := FileDirectory default.
  currentVersion := self sourceFileVersionString.
  newVersion := UIManager default
  request: 'Please designate the version\for the new source code file...' withCRs
  initialAnswer: currentVersion.
  newVersion ifEmpty: [ ^ self ].
  newVersion = currentVersion ifTrue: [ ^ self error: 'The new source file must not be the same as the old.' ].
  self sourceFileVersionString: newVersion.
 
  "Write all sources with fileIndex 1"
  newSourcesFile := defaultDirectory newFileNamed: (defaultDirectory localNameFor: self sourcesName).
  newSourcesFile ifNil: [ ^ self error: 'Couldn''t create source code file in\' withCRs,  defaultDirectory name].
  newSourcesFile
  header;
  timeStamp.
  'Condensing Sources File...'
  displayProgressFrom: 0
  to: self classNames size + self traitNames size
  during:
  [ :bar |
  | count |
  count := 0.
  Smalltalk allClassesAndTraitsDo:
  [ :classOrTrait |
  bar value: (count := count + 1).
  classOrTrait
  fileOutOn: newSourcesFile
+ moveSource: #historically
- moveSource: true
  toFile: 1 ] ].
  newSourcesFile
  trailer;
  close.
 
  "Make a new empty changes file"
  self closeSourceFiles.
  defaultDirectory
  rename: self changesName
  toBe: self changesName , '.old'.
  (FileStream newFileNamed: self changesName)
  header;
  timeStamp;
  close.
  self lastQuitLogPosition: 0.
  self setMacFileInfoOn: self changesName.
  self setMacFileInfoOn: newSourcesFile name.
  self openSourceFiles.
  self inform: 'Source files have been rewritten to\' withCRs, newSourcesFile name, '\Check that all is well,\and then save/quit.' withCRs!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: System-eem.740.mcz

Chris Muller-3
Thanks Eliot these features are needed for the release.

On Fri, May 29, 2015 at 6:10 PM,  <[hidden email]> wrote:

> Eliot Miranda uploaded a new version of System to project The Trunk:
> http://source.squeak.org/trunk/System-eem.740.mcz
>
> ==================== Summary ====================
>
> Name: System-eem.740
> Author: eem
> Time: 29 May 2015, 4:09:46.189 pm
> UUID: 53894fe9-e3f5-44c7-b4c2-101e4d72f0d3
> Ancestors: System-eem.739
>
> Modify condensSources to preserve direct method history.
>
> =============== Diff against System-eem.739 ===============
>
> Item was changed:
>   ----- Method: SmalltalkImage>>condenseSources (in category 'housekeeping') -----
>   condenseSources
>         "Move all the changes onto a compacted sources file."
>         "Smalltalk condenseSources"
>
>         | newSourcesFile defaultDirectory newVersion currentVersion |
>         Utilities fixUpProblemsWithAllCategory.
>         "The above removes any concrete, spurious '-- all --' categories, which mess up the process."
>         defaultDirectory := FileDirectory default.
>         currentVersion := self sourceFileVersionString.
>         newVersion := UIManager default
>                 request: 'Please designate the version\for the new source code file...' withCRs
>                 initialAnswer: currentVersion.
>         newVersion ifEmpty: [ ^ self ].
>         newVersion = currentVersion ifTrue: [ ^ self error: 'The new source file must not be the same as the old.' ].
>         self sourceFileVersionString: newVersion.
>
>         "Write all sources with fileIndex 1"
>         newSourcesFile := defaultDirectory newFileNamed: (defaultDirectory localNameFor: self sourcesName).
>         newSourcesFile ifNil: [ ^ self error: 'Couldn''t create source code file in\' withCRs,  defaultDirectory name].
>         newSourcesFile
>                 header;
>                 timeStamp.
>         'Condensing Sources File...'
>                 displayProgressFrom: 0
>                 to: self classNames size + self traitNames size
>                 during:
>                         [ :bar |
>                         | count |
>                         count := 0.
>                         Smalltalk allClassesAndTraitsDo:
>                                 [ :classOrTrait |
>                                 bar value: (count := count + 1).
>                                 classOrTrait
>                                         fileOutOn: newSourcesFile
> +                                       moveSource: #historically
> -                                       moveSource: true
>                                         toFile: 1 ] ].
>         newSourcesFile
>                 trailer;
>                 close.
>
>         "Make a new empty changes file"
>         self closeSourceFiles.
>         defaultDirectory
>                 rename: self changesName
>                 toBe: self changesName , '.old'.
>         (FileStream newFileNamed: self changesName)
>                 header;
>                 timeStamp;
>                 close.
>         self lastQuitLogPosition: 0.
>         self setMacFileInfoOn: self changesName.
>         self setMacFileInfoOn: newSourcesFile name.
>         self openSourceFiles.
>         self inform: 'Source files have been rewritten to\' withCRs, newSourcesFile name, '\Check that all is well,\and then save/quit.' withCRs!
>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: System-eem.740.mcz

Eliot Miranda-2
Hi Chris,

On Fri, May 29, 2015 at 4:27 PM, Chris Muller <[hidden email]> wrote:
Thanks Eliot these features are needed for the release.

So what about the details?  here's a straw man.  Produce Squeak 4.6's changes file by doing condenseChanges on an updated image, but still keeping SqueakV41.sources as its source file.  Produce Squeak 5.0's sources file by doing condenseSources on an undated Spur image, which will result in an empty changes file.
 

On Fri, May 29, 2015 at 6:10 PM,  <[hidden email]> wrote:
> Eliot Miranda uploaded a new version of System to project The Trunk:
> http://source.squeak.org/trunk/System-eem.740.mcz
>
> ==================== Summary ====================
>
> Name: System-eem.740
> Author: eem
> Time: 29 May 2015, 4:09:46.189 pm
> UUID: 53894fe9-e3f5-44c7-b4c2-101e4d72f0d3
> Ancestors: System-eem.739
>
> Modify condensSources to preserve direct method history.
>
> =============== Diff against System-eem.739 ===============
>
> Item was changed:
>   ----- Method: SmalltalkImage>>condenseSources (in category 'housekeeping') -----
>   condenseSources
>         "Move all the changes onto a compacted sources file."
>         "Smalltalk condenseSources"
>
>         | newSourcesFile defaultDirectory newVersion currentVersion |
>         Utilities fixUpProblemsWithAllCategory.
>         "The above removes any concrete, spurious '-- all --' categories, which mess up the process."
>         defaultDirectory := FileDirectory default.
>         currentVersion := self sourceFileVersionString.
>         newVersion := UIManager default
>                 request: 'Please designate the version\for the new source code file...' withCRs
>                 initialAnswer: currentVersion.
>         newVersion ifEmpty: [ ^ self ].
>         newVersion = currentVersion ifTrue: [ ^ self error: 'The new source file must not be the same as the old.' ].
>         self sourceFileVersionString: newVersion.
>
>         "Write all sources with fileIndex 1"
>         newSourcesFile := defaultDirectory newFileNamed: (defaultDirectory localNameFor: self sourcesName).
>         newSourcesFile ifNil: [ ^ self error: 'Couldn''t create source code file in\' withCRs,  defaultDirectory name].
>         newSourcesFile
>                 header;
>                 timeStamp.
>         'Condensing Sources File...'
>                 displayProgressFrom: 0
>                 to: self classNames size + self traitNames size
>                 during:
>                         [ :bar |
>                         | count |
>                         count := 0.
>                         Smalltalk allClassesAndTraitsDo:
>                                 [ :classOrTrait |
>                                 bar value: (count := count + 1).
>                                 classOrTrait
>                                         fileOutOn: newSourcesFile
> +                                       moveSource: #historically
> -                                       moveSource: true
>                                         toFile: 1 ] ].
>         newSourcesFile
>                 trailer;
>                 close.
>
>         "Make a new empty changes file"
>         self closeSourceFiles.
>         defaultDirectory
>                 rename: self changesName
>                 toBe: self changesName , '.old'.
>         (FileStream newFileNamed: self changesName)
>                 header;
>                 timeStamp;
>                 close.
>         self lastQuitLogPosition: 0.
>         self setMacFileInfoOn: self changesName.
>         self setMacFileInfoOn: newSourcesFile name.
>         self openSourceFiles.
>         self inform: 'Source files have been rewritten to\' withCRs, newSourcesFile name, '\Check that all is well,\and then save/quit.' withCRs!
>
>




--
best,
Eliot


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: System-eem.740.mcz

Chris Muller-3
I've always considered two different ways to deliver changes and
sources, and never got enough experience with it to know which I
preferred.

The first approach was for the changes file to contain the changes
that occurred from the prior release to arrive at the current release.
The second way was that the changes file would start empty at the
beginning of the release, and then any changes the user put in are in
that file, which seems to makes sense.

Since we can keep all prior history in sources now, seems like the
second approach is best.

4.6 deserves a new sources file, and #prepareNewRelease is where we
should do whatever we're gonna do, every release.  #condenseSources
(historically) seems like the right thing to do for every release, so
how about that?

But can condenseSources be run non-interactively?


On Fri, May 29, 2015 at 7:17 PM, Eliot Miranda <[hidden email]> wrote:

> Hi Chris,
>
> On Fri, May 29, 2015 at 4:27 PM, Chris Muller <[hidden email]> wrote:
>>
>> Thanks Eliot these features are needed for the release.
>
>
> So what about the details?  here's a straw man.  Produce Squeak 4.6's
> changes file by doing condenseChanges on an updated image, but still keeping
> SqueakV41.sources as its source file.  Produce Squeak 5.0's sources file by
> doing condenseSources on an undated Spur image, which will result in an
> empty changes file.
>
>>
>>
>> On Fri, May 29, 2015 at 6:10 PM,  <[hidden email]> wrote:
>> > Eliot Miranda uploaded a new version of System to project The Trunk:
>> > http://source.squeak.org/trunk/System-eem.740.mcz
>> >
>> > ==================== Summary ====================
>> >
>> > Name: System-eem.740
>> > Author: eem
>> > Time: 29 May 2015, 4:09:46.189 pm
>> > UUID: 53894fe9-e3f5-44c7-b4c2-101e4d72f0d3
>> > Ancestors: System-eem.739
>> >
>> > Modify condensSources to preserve direct method history.
>> >
>> > =============== Diff against System-eem.739 ===============
>> >
>> > Item was changed:
>> >   ----- Method: SmalltalkImage>>condenseSources (in category
>> > 'housekeeping') -----
>> >   condenseSources
>> >         "Move all the changes onto a compacted sources file."
>> >         "Smalltalk condenseSources"
>> >
>> >         | newSourcesFile defaultDirectory newVersion currentVersion |
>> >         Utilities fixUpProblemsWithAllCategory.
>> >         "The above removes any concrete, spurious '-- all --'
>> > categories, which mess up the process."
>> >         defaultDirectory := FileDirectory default.
>> >         currentVersion := self sourceFileVersionString.
>> >         newVersion := UIManager default
>> >                 request: 'Please designate the version\for the new
>> > source code file...' withCRs
>> >                 initialAnswer: currentVersion.
>> >         newVersion ifEmpty: [ ^ self ].
>> >         newVersion = currentVersion ifTrue: [ ^ self error: 'The new
>> > source file must not be the same as the old.' ].
>> >         self sourceFileVersionString: newVersion.
>> >
>> >         "Write all sources with fileIndex 1"
>> >         newSourcesFile := defaultDirectory newFileNamed:
>> > (defaultDirectory localNameFor: self sourcesName).
>> >         newSourcesFile ifNil: [ ^ self error: 'Couldn''t create source
>> > code file in\' withCRs,  defaultDirectory name].
>> >         newSourcesFile
>> >                 header;
>> >                 timeStamp.
>> >         'Condensing Sources File...'
>> >                 displayProgressFrom: 0
>> >                 to: self classNames size + self traitNames size
>> >                 during:
>> >                         [ :bar |
>> >                         | count |
>> >                         count := 0.
>> >                         Smalltalk allClassesAndTraitsDo:
>> >                                 [ :classOrTrait |
>> >                                 bar value: (count := count + 1).
>> >                                 classOrTrait
>> >                                         fileOutOn: newSourcesFile
>> > +                                       moveSource: #historically
>> > -                                       moveSource: true
>> >                                         toFile: 1 ] ].
>> >         newSourcesFile
>> >                 trailer;
>> >                 close.
>> >
>> >         "Make a new empty changes file"
>> >         self closeSourceFiles.
>> >         defaultDirectory
>> >                 rename: self changesName
>> >                 toBe: self changesName , '.old'.
>> >         (FileStream newFileNamed: self changesName)
>> >                 header;
>> >                 timeStamp;
>> >                 close.
>> >         self lastQuitLogPosition: 0.
>> >         self setMacFileInfoOn: self changesName.
>> >         self setMacFileInfoOn: newSourcesFile name.
>> >         self openSourceFiles.
>> >         self inform: 'Source files have been rewritten to\' withCRs,
>> > newSourcesFile name, '\Check that all is well,\and then save/quit.' withCRs!
>> >
>> >
>>
>
>
>
> --
> best,
> Eliot
>
>
>