Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gofer: Remove update of categories #14584

Merged
merged 1 commit into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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