Skip to content

Commit

Permalink
Merge pull request #14584 from jecisc/Gofer/remove-dead-code
Browse files Browse the repository at this point in the history
Gofer: Remove update of categories
  • Loading branch information
jecisc committed Sep 5, 2023
2 parents 042c261 + b1edf79 commit 4212c8d
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 61 deletions.
23 changes: 3 additions & 20 deletions src/Gofer-Core/GoferLoad.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ GoferLoad >> defaultModel [

{ #category : #running }
GoferLoad >> execute [
self model hasVersions
ifTrue: [ self model load ].
self updateRepositories.
self updateCategories

self model hasVersions ifTrue: [ self model load ].
self updateRepositories
]

{ #category : #initialization }
Expand All @@ -40,22 +39,6 @@ GoferLoad >> initializeOn: aGofer [
displayingProgress: 'Loading Versions'
]

{ #category : #private }
GoferLoad >> updateCategories [
"This method makes sure that the categories are ordered in load-order and as specified in the packages."

| categories |
categories := OrderedCollection new.
self versions do: [ :version |
version snapshot definitions do: [ :definition |
definition isOrganizationDefinition ifTrue: [
definition categories do: [ :category |
(categories includes: category)
ifFalse: [ categories addLast: category ] ] ] ] ].
(MCOrganizationDefinition categories: categories)
postloadOver: nil
]

{ #category : #private }
GoferLoad >> updateRepositories [
"This code makes sure that all packages have a repository assigned, including the dependencies."
Expand Down
15 changes: 1 addition & 14 deletions src/Metacello-Core/MetacelloPlatform.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ Class {
#name : #MetacelloPlatform,
#superclass : #Object,
#instVars : [
'bypassProgressBars',
'bypassGoferLoadUpdateCategories'
'bypassProgressBars'
],
#classVars : [
'Current'
Expand Down Expand Up @@ -48,18 +47,6 @@ MetacelloPlatform >> authorName: aString [
self subclassResponsibility
]

{ #category : #accessing }
MetacelloPlatform >> bypassGoferLoadUpdateCategories [

bypassGoferLoadUpdateCategories == nil ifTrue: [ bypassGoferLoadUpdateCategories := false ].
^ bypassGoferLoadUpdateCategories
]

{ #category : #accessing }
MetacelloPlatform >> bypassGoferLoadUpdateCategories: anObject [
bypassGoferLoadUpdateCategories := anObject
]

{ #category : #accessing }
MetacelloPlatform >> bypassProgressBars [

Expand Down
6 changes: 0 additions & 6 deletions src/Metacello-MC/MetacelloGoferLoad.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ Class {
#category : #'Metacello-MC-Gofer'
}

{ #category : #private }
MetacelloGoferLoad >> updateCategories [
MetacelloPlatform current bypassGoferLoadUpdateCategories
ifFalse: [ super updateCategories ]
]

{ #category : #private }
MetacelloGoferLoad >> updateRepositories [
"Noop for Metacello...done by loader itself"
Expand Down
11 changes: 4 additions & 7 deletions src/Metacello-TestsMC/MetacelloDictionaryRepositoryTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,10 @@ MetacelloDictionaryRepositoryTest >> projectWith: projectAttributes [

{ #category : #running }
MetacelloDictionaryRepositoryTest >> runCase [
| original |
(self doSilently) ifFalse: [ ^super runCase ].
original := MetacelloPlatform current bypassGoferLoadUpdateCategories.
[
MetacelloPlatform current bypassGoferLoadUpdateCategories: true.
^ MetacelloPlatform current suspendSystemUpdateEventsDuring: [ super runCase ] ]
ensure: [ MetacelloPlatform current bypassGoferLoadUpdateCategories: original ]

self doSilently ifFalse: [ ^ super runCase ].

^ MetacelloPlatform current suspendSystemUpdateEventsDuring: [ super runCase ]
]

{ #category : #running }
Expand Down
8 changes: 2 additions & 6 deletions src/Metacello-TestsMC/MetacelloIssueTestCase.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,8 @@ MetacelloIssueTestCase >> projectWith: projectAttributes [

{ #category : #running }
MetacelloIssueTestCase >> runCase [
| original |
original := MetacelloPlatform current bypassGoferLoadUpdateCategories.
[
MetacelloPlatform current bypassGoferLoadUpdateCategories: true.
^ MetacelloPlatform current suspendSystemUpdateEventsDuring: [ super runCase ] ]
ensure: [ MetacelloPlatform current bypassGoferLoadUpdateCategories: original ]

^ MetacelloPlatform current suspendSystemUpdateEventsDuring: [ super runCase ]
]

{ #category : #running }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,10 @@ MetacelloScriptingStdTstHarnessTestCase >> hasPackage: aString [

{ #category : #running }
MetacelloScriptingStdTstHarnessTestCase >> runCase [
| original |
self doSilently
ifFalse: [ ^ super runCase ].
original := MetacelloPlatform current bypassGoferLoadUpdateCategories.
[
MetacelloPlatform current bypassGoferLoadUpdateCategories: true.
^ MetacelloPlatform current suspendSystemUpdateEventsDuring: [ super runCase ] ]
ensure: [ MetacelloPlatform current bypassGoferLoadUpdateCategories: original ]

self doSilently ifFalse: [ ^ super runCase ].

^ MetacelloPlatform current suspendSystemUpdateEventsDuring: [ super runCase ]
]

{ #category : #running }
Expand Down

0 comments on commit 4212c8d

Please sign in to comment.