Skip to content

Commit

Permalink
fix Monticello dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-krivanek committed Nov 6, 2019
1 parent 69d8db1 commit 19ac726
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 35 deletions.
2 changes: 1 addition & 1 deletion src/Compression/ManifestCompression.class.st
Expand Up @@ -9,6 +9,6 @@ Class {

{ #category : #'meta-data - dependency analyser' }
ManifestCompression class >> manuallyResolvedDependencies [
^ #(#Jobs #'System-Support' #'System-Localization' #'System-Changes' #'Collections-Abstract' #'Transcript-Core')
^ #(#Jobs #'System-Support' #'System-Changes' #'Collections-Abstract')

]
2 changes: 1 addition & 1 deletion src/Compression/ZipReadStream.class.st
Expand Up @@ -42,6 +42,6 @@ ZipReadStream >> verifyCrc [
| invertedCrc |
invertedCrc := crc bitXor: 16rFFFFFFFF.
(expectedCrc notNil and: [ expectedCrc ~= invertedCrc ])
ifTrue: [ ^ self crcError: ('Wrong CRC-32 (expected {1} got {2}) (proceed to ignore)' translated format: { expectedCrc printStringHex. invertedCrc printStringHex }) ].
ifTrue: [ ^ self crcError: ('Wrong CRC-32 (expected {1} got {2}) (proceed to ignore)' format: { expectedCrc printStringHex. invertedCrc printStringHex }) ].
^invertedCrc
]
25 changes: 12 additions & 13 deletions src/Compression/ZipWriteStream.class.st
Expand Up @@ -79,13 +79,12 @@ ZipWriteStream class >> printRegressionStats: stats from: fd [
ifTrue: [ ^ self ].
compressed := stats at: #compressedSize ifAbsent: [ 0 ].
numFiles := stats at: #numFiles ifAbsent: [ 0 ].
self traceCr: fd fullName.
self traceCrTab: 'Files compressed: ' , numFiles asStringWithCommas.
self traceCrTab: 'Bytes compressed: ' , raw asStringWithCommas.
self
traceCrTab:
'Avg. compression ratio: '
, (compressed / raw asFloat * 100.0 truncateTo: 0.01) asString

SystemNotification signal: (String streamContents: [ :aStream |
aStream nextPutAll: fd fullName asString; cr.
aStream tab; nextPutAll: 'Files compressed: '; nextPutAll: numFiles asStringWithCommas; cr.
aStream tab; nextPutAll: 'Bytes compressed: '; nextPutAll: raw asStringWithCommas; cr.
aStream tab; nextPutAll: 'Avg. compression ratio: '; nextPutAll: (compressed / raw asFloat * 100.0 truncateTo: 0.01) asString ])
]

{ #category : #'regression test' }
Expand Down Expand Up @@ -159,7 +158,7 @@ ZipWriteStream >> dynamicBlockSizeFor: lTree and: dTree using: blTree and: blFre
freq > 0 ifTrue:[
treeBits := treeBits + (freq * ((blTree bitLengthAt: i) + addl "addl bits"))]].
VerboseLevel > 1 ifTrue:[
self trace:'[', treeBits asString . self trace:' bits for dynamic tree]'].
SystemNotification signal: ('[', treeBits asString, ' bits for dynamic tree]')].
bits := bits + treeBits.

"Compute the size of the compressed block"
Expand Down Expand Up @@ -277,8 +276,8 @@ ZipWriteStream >> flushBlock: lastBlock [
using: blTree
and: blFreq.
VerboseLevel > 1
ifTrue: [ self
traceCr:
ifTrue: [
SystemNotification signal:
(String
streamContents: [ :stream |
stream
Expand Down Expand Up @@ -309,19 +308,19 @@ ZipWriteStream >> flushBlock: lastBlock [
bitsRequired := nil.
method == #stored
ifTrue: [ VerboseLevel > 0
ifTrue: [ self trace: 'S' ].
ifTrue: [ SystemNotification signal: 'S' ].
bitsRequired := storedLength.
encoder nextBits: 3 put: (StoredBlock << 1) + lastFlag.
self sendStoredBlock ].
method == #fixed
ifTrue: [ VerboseLevel > 0
ifTrue: [ self trace: 'F' ].
ifTrue: [ SystemNotification signal: 'F' ].
bitsRequired := fixedLength.
encoder nextBits: 3 put: (FixedBlock << 1) + lastFlag.
self sendFixedBlock ].
method == #dynamic
ifTrue: [ VerboseLevel > 0
ifTrue: [ self trace: 'D' ].
ifTrue: [ SystemNotification signal: 'D' ].
bitsRequired := dynamicLength.
encoder nextBits: 3 put: (DynamicBlock << 1) + lastFlag.
self
Expand Down
6 changes: 3 additions & 3 deletions src/Monticello/MCMergeOrLoadWarning.class.st
Expand Up @@ -26,9 +26,9 @@ MCMergeOrLoadWarning >> cancel [
MCMergeOrLoadWarning >> defaultAction [
^ ( UIManager default
confirm: self messageText
trueChoice: 'Load' translated
falseChoice: 'Merge' translated
cancelChoice: 'Cancel' translated
trueChoice: 'Load'
falseChoice: 'Merge'
cancelChoice: 'Cancel'
default: nil ).
]

Expand Down
2 changes: 1 addition & 1 deletion src/Monticello/ManifestMonticello.class.st
Expand Up @@ -14,5 +14,5 @@ ManifestMonticello class >> ignoredDependencies [

{ #category : #'meta-data - dependency analyser' }
ManifestMonticello class >> manuallyResolvedDependencies [
^ #(#'Graphics-Primitives' #'OpalCompiler-Core' #'System-Localization' #Jobs #'Random-Core' #'FFI-Kernel' #'Ring-Definitions-Monticello' #'System-Settings-Core' #'FileSystem-Disk')
^ #(#'Graphics-Primitives' #'OpalCompiler-Core' #Jobs #'Random-Core' #'FFI-Kernel' #'Ring-Definitions-Monticello' #'System-Settings-Core' #'FileSystem-Disk')
]
24 changes: 8 additions & 16 deletions src/System-DependenciesTests/SystemDependenciesTest.class.st
Expand Up @@ -76,7 +76,7 @@ SystemDependenciesTest >> knownDisplayDependencies [

"ideally this list should be empty"

^ #(#'Fonts-Abstract' #'Graphics-Canvas' #'Graphics-Files' #'Polymorph-Widgets' #'SUnit-Core' #'System-Localization' #'Transcript-Core')
^ #(#'Fonts-Abstract' #'Graphics-Canvas' #'Graphics-Files' #'Polymorph-Widgets' #'SUnit-Core' #'System-Localization')
]

{ #category : #'known dependencies' }
Expand Down Expand Up @@ -104,36 +104,28 @@ SystemDependenciesTest >> knownKernelDependencies [
^ #(#'FileSystem-Core')
]

{ #category : #'known dependencies' }
SystemDependenciesTest >> knownLocalMonticelloDependencies [

"ideally this list should be empty"

^ #(#'System-Localization' #'Transcript-Core')
]

{ #category : #'known dependencies' }
SystemDependenciesTest >> knownMetacelloDependencies [

"ideally this list should be empty"

^ #(#'Fonts-Abstract' #'SUnit-Core' #'System-Localization' #'Transcript-Core')
^ #(#'Fonts-Abstract' #'SUnit-Core' #'System-Localization')
]

{ #category : #'known dependencies' }
SystemDependenciesTest >> knownMonticelloDependencies [

"ideally this list should be empty"

^ #(#'System-Localization' #'Transcript-Core')
^ #()
]

{ #category : #'known dependencies' }
SystemDependenciesTest >> knownMorphicCoreDependencies [

"ideally this list should be empty"

^ #(#'Fonts-Abstract' #'Graphics-Files' #'Keymapping-KeyCombinations' #'Morphic-Base' #'Morphic-Widgets-Windows' #'Polymorph-Widgets' #'Refactoring-Critics' #'Refactoring-Environment' #'System-Clipboard' #'System-Localization' #'Transcript-Core')
^ #(#'Fonts-Abstract' #'Graphics-Files' #'Keymapping-KeyCombinations' #'Morphic-Base' #'Morphic-Widgets-Windows' #'Polymorph-Widgets' #'Refactoring-Critics' #'Refactoring-Environment' #'System-Clipboard' #'System-Localization')
]

{ #category : #'known dependencies' }
Expand All @@ -149,7 +141,7 @@ SystemDependenciesTest >> knownSUnitDependencies [

"ideally this list should be empty"

^ #(#'Fonts-Abstract' #'Refactoring-Critics' #'Refactoring-Environment' #'System-Localization' #'Transcript-Core')
^ #(#'Fonts-Abstract' #'Refactoring-Critics' #'Refactoring-Environment' #'System-Localization')
]

{ #category : #'known dependencies' }
Expand All @@ -174,7 +166,7 @@ SystemDependenciesTest >> knownUFFIDependencies [

"ideally this list should be empty"

^ #(#'Fonts-Abstract' #'Refactoring-Critics' #'Refactoring-Environment' #'System-Localization' #'Transcript-Core')
^ #(#'Fonts-Abstract' #'Refactoring-Critics' #'Refactoring-Environment' #'System-Localization')
]

{ #category : #'known dependencies' }
Expand Down Expand Up @@ -401,7 +393,7 @@ SystemDependenciesTest >> testExternalLocalMonticelloDependencies [
BaselineOfPharoBootstrap kernelAdditionalPackagesNames,
BaselineOfMonticello corePackageNames).

self assertCollection: dependencies hasSameElements: self knownLocalMonticelloDependencies.
self assert: dependencies isEmpty.
]

{ #category : #tests }
Expand Down Expand Up @@ -433,7 +425,7 @@ SystemDependenciesTest >> testExternalMonticelloDependencies [
BaselineOfMonticello corePackageNames,
BaselineOfMonticello remoteRepositoriesPackageNames).

self assertCollection: dependencies hasSameElements: self knownMonticelloDependencies.
self assert: dependencies isEmpty.
]

{ #category : #tests }
Expand Down

0 comments on commit 19ac726

Please sign in to comment.