David T. Lewis uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-dtl.1374.mcz
==================== Summary ====================
Name: System-dtl.1374
Author: dtl
Time: 25 November 2022, 2:00:24.392665 pm
UUID: f4b3b5ed-db5c-445a-be6b-3f29ea6552e3
Ancestors: System-dtl.1373
Support use of ChangeLogStream for changes log maintained within the image.
=============== Diff against System-dtl.1373 ===============
Item was changed:
----- Method: SmalltalkImage>>openSourcesAndChanges:forImage: (in category 'image, changes names') -----
openSourcesAndChanges: changesName forImage: imageName
"Open the changes and sources files and install them in SourceFiles. Inform the user of problems regarding write permissions or CR/CRLF mixups."
"Note: SourcesName and imageName are full paths; changesName is a
local name."
| sources changes msg wmsg |
msg := 'Squeak cannot locate {1}.
Please check that the file is named properly and is in the same directory as this image.'.
wmsg := 'Squeak cannot write to {1}.
Please check that you have write permission for this file.
You won''t be able to save this image correctly until you fix this.'.
sources := Smalltalk openSources.
sources ifNotNil: [sources setConverterForCode].
+ changes := SourceFileArray cachedChanges
+ ifNil: [Smalltalk openChanges: changesName forImage: imageName].
- changes := Smalltalk openChanges: changesName forImage: imageName.
changes ifNotNil: [changes setConverterForCode].
-
((sources == nil or: [sources atEnd])
and: [Preferences valueOfFlag: #warnIfNoSourcesFile])
ifTrue: [Smalltalk platformName = 'Mac OS'
ifTrue: [msg := msg , '
Make sure the sources file is not an Alias.'].
self inform: (msg format: { 'the sources file named ' , self sourcesName })].
(changes == nil
and: [Preferences valueOfFlag: #warnIfNoChangesFile])
ifTrue: [self inform: (msg format: { 'the changes file named ' , changesName })].
((Preferences valueOfFlag: #warnIfNoChangesFile) and: [changes notNil])
ifTrue: [changes isReadOnly
ifTrue: [self inform: (wmsg format: { 'the changes file named ' , changesName })].
((changes next: 200)
includesSubstring: String crlf)
ifTrue: [self inform: ('The changes file named <b>{1}</b> has been injured by an unpacking utility. Line endings were changed from Cr to CrLf.<br><br>Please set the preferences in your decompressing program to
<b>do not convert text files</b> and unpack the system again.' translated format: { changesName }) asTextFromHtml]].
SourceFiles := Array with: sources with: changes!
Item was changed:
----- Method: SmalltalkImage>>saveAs: (in category 'sources, changes log') -----
saveAs: newName
"Save the image under that new name."
newName ifNil:[^ self].
+
+ (SourceFileArray internalizeChanges or: (SourceFiles at: 2) isNil) ifFalse:
- (SourceFiles at: 2) ifNotNil:
[self closeSourceFiles; "so copying the changes file will always work"
saveChangesInFileNamed: (self fullNameForChangesNamed: newName)].
self saveImageInFileNamed: (self fullNameForImageNamed: newName)!
Item was changed:
----- Method: SmalltalkImage>>saveAsNewVersion (in category 'sources, changes log') -----
saveAsNewVersion
"Save the image/changes using the next available version number."
"Smalltalk saveAsNewVersion"
| newName changesName aName anIndex |
aName := FileDirectory baseNameFor: (FileDirectory default localNameFor: self imageName).
anIndex := aName lastIndexOf: FileDirectory dot asCharacter ifAbsent: [nil].
(anIndex notNil and: [(aName copyFrom: anIndex + 1 to: aName size) isAllDigits])
ifTrue:
[aName := aName copyFrom: 1 to: anIndex - 1].
newName := FileDirectory default nextNameFor: aName extension: FileDirectory imageSuffix.
changesName := self fullNameForChangesNamed: newName.
+ (SourceFileArray internalizeChanges or: (SourceFiles at: 2) isNil) ifFalse: [
+ "Check to see if there is a .changes file that would cause a problem if we saved a new .image file with the new version number"
+ (FileDirectory default fileOrDirectoryExists: changesName)
+ ifTrue:
+ [^ self inform:
- "Check to see if there is a .changes file that would cause a problem if we saved a new .image file with the new version number"
- (FileDirectory default fileOrDirectoryExists: changesName)
- ifTrue:
- [^ self inform:
'There is already .changes file of the desired name,
', newName, '
curiously already present, even though there is
no corresponding .image file. Please remedy
manually and then repeat your request.'].
+ self closeSourceFiles; "so copying the changes file will always work"
+ saveChangesInFileNamed: (self fullNameForChangesNamed: newName)
+ ].
- (SourceFiles at: 2) ifNotNil:
- [self closeSourceFiles; "so copying the changes file will always work"
- saveChangesInFileNamed: (self fullNameForChangesNamed: newName)].
self saveImageInFileNamed: (self fullNameForImageNamed: newName)
!
Christoph Thiede uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ct.2056.mcz
==================== Summary ====================
Name: Morphic-ct.2056
Author: ct
Time: 25 November 2022, 9:50:29.694279 pm
UUID: 530972e6-066d-574c-9b6e-fabcddee4403
Ancestors: Morphic-ct.2055
refactor: Uses existing magic number selectors for MouseButtonEvent>>*buttonChanged.
=============== Diff against Morphic-ct.2055 ===============
Item was changed:
----- Method: MouseButtonEvent>>blueButtonChanged (in category 'accessing') -----
blueButtonChanged
"Answer true if the blue mouse button has changed. This is the third mouse button or cmd+click on the Mac."
+ ^ whichButton anyMask: self class blueButton!
- ^ whichButton anyMask: 1!
Item was changed:
----- Method: MouseButtonEvent>>redButtonChanged (in category 'accessing') -----
redButtonChanged
"Answer true if the red mouse button has changed. This is the first mouse button."
+ ^ whichButton anyMask: self class redButton!
- ^ whichButton anyMask: 4!
Item was changed:
----- Method: MouseButtonEvent>>yellowButtonChanged (in category 'accessing') -----
yellowButtonChanged
"Answer true if the yellow mouse button has changed. This is the second mouse button or option+click on the Mac."
+ ^ whichButton anyMask: self class yellowButton!
- ^ whichButton anyMask: 2!
Christoph Thiede uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-ct.322.mcz
==================== Summary ====================
Name: ToolBuilder-Morphic-ct.322
Author: ct
Time: 25 November 2022, 9:03:03.384883 pm
UUID: d913a7d8-7ecc-684a-aac5-c3c3e4d98b9c
Ancestors: ToolBuilder-Morphic-ct.320
Fixes small regression in directory chooser: After typing an invalid path and selecting a valid tree item, the accept button must be enabled again.
=============== Diff against ToolBuilder-Morphic-ct.320 ===============
Item was added:
+ ----- Method: DirectoryChooserDialog>>setDirectoryTo: (in category 'directory tree') -----
+ setDirectoryTo: dir
+
+ super setDirectoryTo: dir.
+
+ self changed: #canAccept.!
Please object within one week before I merge this into the Trunk. Support for text fragments would be pretty useful for SqueakInboxTalk. :-)
Best,
Christoph
=============== Summary ===============
Change Set: url-fragment-encoding
Date: 25 November 2022
Author: Christoph Thiede
Fixes encoding and decoding of URL fragments and adds rough support for fragment directives. Adds tests.
Concretely, this patch enables the following things:
* parse an encoded URL fragment like #See%20also (previously, the fragment was not decoded but encoded again)
* print a URL with fragment directive (previously, the directive prefix was also encoded, and text directives were encoded incorrectly)
Adds new accessors for fragment parts. Note that there is only rough support for directives at the moment, i.e., we don't do a deep parse of the directive but only make sure that we don't break the directive during decoding and reencoding (see #testAbsoluteHTTP). Improved support might follow in the future, but for now, just let's make it possible to open a URL with fragment directive in your browser. For instance, SqueakInboxTalk/ExternalWebBrowser needs this. Baby steps. ;-). For more details, see: https://wicg.github.io/scroll-to-text-fragment/
=============== Diff ===============
FileUrl>>printOn: {printing} · ct 11/25/2022 19:29 (changed)
printOn: aStream
"Return the FileUrl according to RFC1738 plus supporting fragments:
'file://<host>/<path>#<fragment>'
Note that <host> being '' is equivalent to 'localhost'.
Note: The pathString can not start with a leading $/
to indicate an 'absolute' file path.
This is not according to RFC1738 where the path should have
no leading or trailing slashes, and always
be considered absolute relative to the filesystem."
aStream nextPutAll: self schemeName, '://'.
host ifNotNil: [aStream nextPutAll: host].
aStream
nextPut: $/;
nextPutAll: self pathString.
- fragment ifNotNil:
- [aStream
- nextPut: $#;
- nextPutAll: fragment encodeForHTTP].
+ self printFragmentOn: aStream.
GenericUrl>>printOn: {printing} · ct 11/25/2022 19:29 (changed)
printOn: aStream
aStream nextPutAll: self schemeName.
aStream nextPut: $:.
aStream nextPutAll: self locator.
- self fragment ifNotNil:
- [aStream nextPut: $#.
- aStream nextPutAll: self fragment].
+ self printFragmentOn: aStream.
HierarchicalUrl>>printOn: {printing} · ct 11/25/2022 19:29 (changed)
printOn: aStream
aStream nextPutAll: self schemeName.
aStream nextPutAll: '://'.
self username ifNotNil: [
aStream nextPutAll: self username encodeForHTTP.
self password ifNotNil: [
aStream nextPutAll: ':'.
aStream nextPutAll: self password encodeForHTTP].
aStream nextPutAll: '@' ].
aStream nextPutAll: self authority.
port ifNotNil: [aStream nextPut: $:; print: port].
path do: [ :pathElem |
aStream nextPut: $/.
aStream nextPutAll: pathElem encodeForHTTP. ].
self query isNil ifFalse: [
aStream nextPut: $?.
aStream nextPutAll: self query. ].
- self fragment isNil ifFalse: [
- aStream nextPut: $#.
- aStream nextPutAll: self fragment encodeForHTTP. ].
+ self printFragmentOn: aStream.
Url class>>absoluteFromText: {parsing} · ct 11/25/2022 19:03 (changed)
absoluteFromText: aString
"Return a URL from a string and handle
a String without a scheme as a HttpUrl."
"Url absoluteFromText: 'http://chaos.resnet.gatech.edu:8000/docs/java/index.html?A%20query%20#part'"
"Url absoluteFromText: 'msw://chaos.resnet.gatech.edu:9000/testbook?top'"
"Url absoluteFromText: 'telnet:chaos.resnet.gatech.edu'"
"Url absoluteFromText: 'file:/etc/passwd'"
| remainder index scheme fragment newUrl |
"trim surrounding whitespace"
remainder := aString withBlanksTrimmed.
"extract the fragment, if any"
index := remainder indexOf: $#.
index > 0 ifTrue: [
- fragment := remainder copyFrom: index + 1 to: remainder size.
+ fragment := (remainder copyFrom: index + 1 to: remainder size) unescapePercents.
remainder := remainder copyFrom: 1 to: index - 1].
"choose class based on the scheme name, and let that class do the bulk of the parsing"
scheme := self schemeNameForString: remainder.
newUrl := (self urlClassForScheme: scheme) new privateInitializeFromText: remainder.
newUrl privateFragment: fragment.
^newUrl
Url>>fragmentDirective {fragment} · ct 11/25/2022 19:52
+ fragmentDirective
+
+ ^ self
+ splitFragmentDirectiveDo: [:fragment :directive | directive]
+ otherwise: [:fragment | nil]
Url>>fragmentDirectivePrefix {private} · ct 11/25/2022 20:40
+ fragmentDirectivePrefix
+ "See comment in #splitFragmentDirectiveDo:otherwise:."
+
+ ^ ':~:'
Url>>fragmentWithoutDirective {fragment} · ct 11/25/2022 19:51
+ fragmentWithoutDirective
+
+ ^ self
+ splitFragmentDirectiveDo: [:fragment :directive | fragment]
+ otherwise: [:fragment | fragment]
Url>>newFromRelativeText: {parsing} · ct 11/25/2022 19:07 (changed)
newFromRelativeText: aString
"return a URL relative to the current one, given by aString. For instance, if self is 'http://host/dir/file', and aString is '/dir2/file2', then the return will be a Url for 'http://host/dir2/file2'"
"if the scheme is the same, or not specified, then use the same class"
| newSchemeName remainder fragmentStart newFragment newUrl bare |
bare := aString withBlanksTrimmed.
newSchemeName := Url schemeNameForString: bare.
(newSchemeName isNil not and: [ newSchemeName ~= self schemeName ]) ifTrue: [
"different scheme -- start from scratch"
^Url absoluteFromText: aString ].
remainder := bare.
"remove the fragment, if any"
fragmentStart := remainder indexOf: $#.
fragmentStart > 0 ifTrue: [
- newFragment := remainder copyFrom: fragmentStart+1 to: remainder size.
+ newFragment := (remainder copyFrom: fragmentStart+1 to: remainder size) unescapePercents.
remainder := remainder copyFrom: 1 to: fragmentStart-1].
"remove the scheme name"
newSchemeName ifNotNil: [
remainder := remainder copyFrom: (newSchemeName size + 2) to: remainder size ].
"create and initialize the new url"
newUrl := self class new privateInitializeFromText: remainder relativeTo: self.
"set the fragment"
newUrl privateFragment: newFragment.
^newUrl
Url>>printFragmentOn: {printing} · ct 11/25/2022 20:42
+ printFragmentOn: aStream
+
+ self fragment ifNil: [^ self].
+ aStream nextPut: $#.
+
+ self
+ splitFragmentDirectiveDo: [:fragmentWithoutDirective :directive |
+ | index |
+ aStream
+ nextPutAll: fragmentWithoutDirective encodeForHTTP;
+ nextPutAll: self fragmentDirectivePrefix "do not encode!".
+ (index := directive indexOf: $=) > 0
+ ifTrue: [ "TextDirective"
+ aStream
+ nextPutAll: (directive first: index) "do not encode!";
+ nextPutAll: ((directive allButFirst: index)
+ encodeForHTTPWithTextEncoding: 'utf-8'
+ conditionBlock: [:character |
+ "TextDirectiveExplicitChar"
+ character isSafeForHTTP and: [('&-,' includes: character) not]])]
+ ifFalse: [ "UnknownDirective"
+ aStream nextPutAll: directive encodeForHTTP]]
+ otherwise: [:totalFragment |
+ aStream nextPutAll: totalFragment encodeForHTTP].
Url>>splitFragmentDirectiveDo:otherwise: {fragment} · ct 11/25/2022 20:40
+ splitFragmentDirectiveDo: fragmentDirectiveBlock otherwise: fragmentBlock
+ "Search the fragment for a directive. If one was found, evaluate fragmentDirectiveBlock with the fragment and the directive separated; if the fragment exists but does not have a directive, evaluate fragmentBlock instead. Note that there is only rough support for directives at the moment, i.e., we don't do a deep parse of the directive but only make sure that we don't break the directive during decoding and reencoding (see #testAbsoluteHTTP).
+
+ For more information on fragment directives, see: https://wicg.github.io/scroll-to-text-fragment/"
+
+ | directiveIndex |
+ fragment ifNil: [^ nil].
+
+ directiveIndex := fragment findString: self fragmentDirectivePrefix.
+ directiveIndex = 0 ifTrue: [^ fragmentBlock value: fragment].
+ ^ fragmentDirectiveBlock
+ value: (fragment first: directiveIndex - 1)
+ value: (fragment allButFirst: directiveIndex - 1 + self fragmentDirectivePrefix size)
UrlTest>>testAbsoluteHTTP {tests - absolute urls} · ct 11/25/2022 20:34 (changed)
testAbsoluteHTTP
- url := 'hTTp://chaos.resnet.gatech.edu:8000/docs/java/index.html?A%20query%20#part' asUrl.
+ url := 'hTTp://chaos.resnet.gatech.edu:8000/docs/java/index.html?A%20query%20#a%20p… :~:text=text-start%20' asUrl.
self assert: url schemeName = 'http'.
self assert: url authority = 'chaos.resnet.gatech.edu'.
self assert: url path first = 'docs'.
self assert: url path size = 3.
self assert: url query = 'A%20query%20'.
- self assert: url fragment = 'part'.
+ self assert: url fragment = 'a part :~:text=text-start '.
+ self assert: url fragmentWithoutDirective = 'a part '.
+ self assert: url fragmentDirective = 'text=text-start '.
+
+ self assert: url asString = 'http://chaos.resnet.gatech.edu:8000/docs/java/index.html?A%20query%20#a%20p…'.
UrlTest>>testRelativeHTTP {tests - relative} · ct 11/25/2022 20:03 (changed)
testRelativeHTTP
baseUrl := 'http://some.where/some/dir?query1#fragment1' asUrl.
- url := baseUrl newFromRelativeText: '../another/dir/?query2#fragment2'.
+ url := baseUrl newFromRelativeText: '../another/dir/?query%202#fragment%202'.
- self assert: url asString = 'http://some.where/another/dir/?query2#fragment2'.
+ self assert: url asString = 'http://some.where/another/dir/?query%202#fragment%202'.
---
Sent from Squeak Inbox Talk
["url-fragment-encoding.1.cs"]
Christoph Thiede uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-ct.1493.mcz
==================== Summary ====================
Name: Kernel-ct.1493
Author: ct
Time: 25 November 2022, 6:20:03.170214 pm
UUID: 4ed198f9-d0db-ec40-884f-88826ffae1f5
Ancestors: Kernel-nice.1492
Merges recursive-profaide:
Adds support for recursive process-faithful debugging. Without this patch, debugging the debugger for a process which sends Processor activeProcess will have a different effect than running the original debugger directly. See tests in KernelTests-ct.440 and ToolsTests-ct.117.
This is kind of a delayed follow-up on Kernel-mt.1381. Thanks to Marcel for discussing this issue!
=============== Diff against Kernel-nice.1492 ===============
Item was changed:
----- Method: Process>>effectiveProcess (in category 'accessing') -----
effectiveProcess
+ "effectiveProcess is a mechanism to allow process-faithful debugging. The debugger executes code on behalf of processes, so unless some effort is made the identity of Processor activeProcess is not correctly maintained when debugging code. The debugger uses evaluate:onBehalfOf: to assign the debugged process as the effectiveProcess of the process executing the code, preserving process identity."
+
+ ^effectiveProcess
+ ifNil: [self]
+ ifNotNil: [:process |
+ "Recursive process-faithful debugging. See DebuggerTests>>#test25RecursiveProcessFaithfulDebugging for a practical example."
+ process effectiveProcess]!
- "effectiveProcess is a mechanism to allow process-faithful debugging. The debugger executes code
- on behalf of processes, so unless some effort is made the identity of Processor activeProcess is not
- correctly maintained when debugging code. The debugger uses evaluate:onBehalfOf: to assign the
- debugged process as the effectiveProcess of the process executing the code, preserving process
- identity."
- ^effectiveProcess ifNil: [self]!
David T. Lewis uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-dtl.199.mcz
==================== Summary ====================
Name: Files-dtl.199
Author: dtl
Time: 25 November 2022, 1:59:09.407907 pm
UUID: d67aa170-9fb2-45df-9981-5cd5e6e7e5b9
Ancestors: Files-ct.198
Add ChangeLogStream to allow the changes log to be maintained within the image rather than as an external file. Provide a "Cache changes file" preference for changing the configuration. UTF8 encoding is assumed, and several conversion methods are duplicated from MultiByteFileStream. Inspired by the original Scott Wallace implementation circa 1996, see SystemDictionary>>internalizeChangeLog and SystemDictionary>>internalizeSources in early Squeak images.
=============== Diff against Files-ct.198 ===============
Item was added:
+ ReadWriteStream subclass: #ChangeLogStream
+ instanceVariableNames: 'TextConverter'
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Files-System'!
+
+ !ChangeLogStream commentStamp: 'dtl 11/5/2022 16:22' prior: 0!
+ A ChangeLogStream is a memory resident changes log, equivalent to the traditional file based changes but not stored on the external file system. UTF8 encoding is assumed for all sources and a UTF8TextConverter is used for reading and writing to the stream.
+ !
Item was added:
+ ----- Method: ChangeLogStream>>basicNext:putAll:startingAt: (in category 'private basic') -----
+ basicNext: anInteger putAll: aCollection startingAt: startIndex
+
+ ^super next: anInteger putAll: aCollection startingAt: startIndex!
Item was added:
+ ----- Method: ChangeLogStream>>basicNextPut: (in category 'private basic') -----
+ basicNextPut: char
+
+ ^ super nextPut: char.
+ !
Item was added:
+ ----- Method: ChangeLogStream>>basicNextPutAll: (in category 'private basic') -----
+ basicNextPutAll: aString
+
+ ^ super nextPutAll: aString.
+ !
Item was added:
+ ----- Method: ChangeLogStream>>converter (in category 'converting') -----
+ converter
+ "Assume UTF8 for all sources"
+
+ ^TextConverter ifNil: [TextConverter := UTF8TextConverter new].!
Item was added:
+ ----- Method: ChangeLogStream>>isReadOnly (in category 'testing') -----
+ isReadOnly
+ ^false!
Item was added:
+ ----- Method: ChangeLogStream>>nextChunkText (in category 'fileIn/Out') -----
+ nextChunkText
+ "Deliver the next chunk as a Text. Decode the following ]style[ chunk if present. Position at start of next real chunk."
+
+ ^self converter nextChunkTextFromStream: self!
Item was added:
+ ----- Method: ChangeLogStream>>nextPut: (in category 'accessing') -----
+ nextPut: aCharacter
+
+ ^self converter nextPut: aCharacter toStream: self!
Item was added:
+ ----- Method: ChangeLogStream>>nextPutAll: (in category 'accessing') -----
+ nextPutAll: aCollection
+
+ ^self converter nextPutAll: aCollection toStream: self!
Item was added:
+ ----- Method: ChangeLogStream>>readOnlyCopy (in category 'converting') -----
+ readOnlyCopy
+ ^ self!
Item was added:
+ ----- Method: ChangeLogStream>>reopen (in category 'converting') -----
+ reopen
+ ^self!
Item was changed:
SequenceableCollection subclass: #SourceFileArray
instanceVariableNames: ''
+ classVariableNames: 'CachedChanges'
- classVariableNames: ''
poolDictionaries: ''
category: 'Files-System'!
!SourceFileArray commentStamp: '<historical>' prior: 0!
This class is an abstract superclass for source code access mechanisms. It defines the messages that need to be understood by those subclasses that store and retrieve source chunks on files, over the network or in databases.
The first concrete subclass, StandardSourceFileArray, supports access to the traditional sources and changes files. Other subclasses might implement multiple source files for different applications, or access to a network source server.!
Item was added:
+ ----- Method: SourceFileArray class>>cachedChanges (in category 'internalize changes') -----
+ cachedChanges
+ "When present, CachedChanges replaces the traditional external changes
+ file with an internal stream in the image."
+ ^CachedChanges!
Item was added:
+ ----- Method: SourceFileArray class>>changeLogContents (in category 'internalize changes') -----
+ changeLogContents
+ | changes fs contents |
+ changes := SourceFiles at: 2.
+ (changes isKindOf: FileStream)
+ ifTrue: [[fs := StandardFileStream "Use StandardFileStream, not FileStream concreteStream, to avoid WideString conversion"
+ readOnlyFileNamed: changes name.
+ fs binary.
+ contents := fs upToEnd]
+ ensure: [fs close].
+ "Smalltalk openSourceFiles."
+ ^ contents asString]
+ ifFalse: [^ changes contents]!
Item was added:
+ ----- Method: SourceFileArray class>>externalizeChangeLog (in category 'internalize changes') -----
+ externalizeChangeLog
+ "Move the changes log to an external file. This is the traditional packaging, in
+ which the sources file and changes file are maintained separately from the
+ image file."
+ self safeToExportChanges
+ ifTrue: [ | fs |
+ [fs := FileStream fileNamed: Smalltalk changesName.
+ fs binary.
+ fs nextPutAll: CachedChanges contents.
+ CachedChanges := nil]
+ ensure: [ fs close ].
+ Smalltalk openSourceFiles].
+ !
Item was added:
+ ----- Method: SourceFileArray class>>internalizeChangeLog (in category 'internalize changes') -----
+ internalizeChangeLog
+ "Move the change log to an internal stream and maintain it within the image.
+ This configuration may be risky because the record of recently logged changes
+ is no longer available in a separate external file. If the image file itself becomes
+ unusable, the recent changes log file will not be available."
+ (ChangeLogStream with: self changeLogContents)
+ ifNotNil: [:strm |
+ CachedChanges := strm.
+ SourceFiles at: 2 put: CachedChanges]!
Item was added:
+ ----- Method: SourceFileArray class>>internalizeChanges (in category 'internalize changes') -----
+ internalizeChanges
+
+ <preference: 'Cache changes file'
+ category: 'Files'
+ description: 'Log changes to internal stream rather than external file. External changes file will not be available for error recovery.'
+ type: #Boolean>
+ ^CachedChanges notNil
+ !
Item was added:
+ ----- Method: SourceFileArray class>>internalizeChanges: (in category 'internalize changes') -----
+ internalizeChanges: internalize
+
+ internalize
+ ifTrue: [ self internalizeChangeLog ]
+ ifFalse: [self externalizeChangeLog ].!
Item was added:
+ ----- Method: SourceFileArray class>>safeToExportChanges (in category 'internalize changes') -----
+ safeToExportChanges
+ "Changes log is currently internal, and there is no external changes file with
+ the name that would be used for saving externally or the user confirms that
+ it safe to overwrite that existing file. Existing changes file will be removed if
+ user confirms."
+
+ ^ CachedChanges
+ ifNil: [ false ]
+ ifNotNil: [ (FileDirectory default fileExists: Smalltalk changesName)
+ ifTrue: [ | response |
+ (response :=self confirm: Smalltalk changesName , ' exists, overwrite?')
+ ifTrue: [[ FileDirectory default deleteFileNamed: Smalltalk changesName ]
+ on: Error do: [ self notify: 'cannot delete ', Smalltalk changesName. ^false ]].
+ ^ response ]
+ ifFalse: [true]].
+
+ !
Christoph Thiede uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-ct.495.mcz
==================== Summary ====================
Name: Tests-ct.495
Author: ct
Time: 25 November 2022, 6:41:26.980861 pm
UUID: a3ee3a6b-6274-4443-8fc2-bc458742f921
Ancestors: Tests-eem.494
Silences clean-up of CompilerExceptionsTests.
=============== Diff against Tests-eem.494 ===============
Item was changed:
----- Method: CompilerExceptionsTest>>removeGeneratedMethods (in category 'private') -----
removeGeneratedMethods
+ SystemChangeNotifier uniqueInstance doSilently:
+ [self class removeCategory: 'generated'].!
- self class removeCategory: 'generated'!