Skip to content

Commit

Permalink
fix: force load SmalltalkCI in images that already contain it
Browse files Browse the repository at this point in the history
  • Loading branch information
theseion committed Sep 18, 2024
1 parent bb26ccf commit f8a35da
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 16 deletions.
28 changes: 20 additions & 8 deletions gtoolkit/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,19 @@ gtoolkit::load_project() {
metacello := Metacello new
baseline: 'SmalltalkCI';
repository: 'filetree://$(resolve_path "${SMALLTALK_CI_HOME}/repository")';
onUpgrade: [ :ex | ex useIncoming ].
onUpgrade: [ :ex | ex useIncoming ];
ignoreImage.
(Metacello canUnderstand: #onConflictUseIncoming)
ifTrue: [ metacello onConflictUseIncoming ]
ifFalse: [ metacello onConflict: [ :ex | ex useIncoming ] ].
metacello load ]
on: Warning
do: [ :w | w resume ].
([ Smalltalk at: #MetacelloIgnorePackageLoaded ]
on: KeyNotFound
do: [ :keyEx | keyEx resumeUnchecked: nil ])
ifNil: [ metacello load ]
ifNotNil: [ :exceptionClass |
[ metacello load ] on: exceptionClass do: [ :ex | ex resume: true ] ] ]
on: Warning
do: [ :w | w resume ].
smalltalkCI := Smalltalk at: #SmalltalkCI.
smalltalkCI load: '$(resolve_path "${config_ston}")'.
(smalltalkCI isHeadless or: [ smalltalkCI promptToProceed ])
Expand All @@ -205,13 +211,19 @@ gtoolkit::test_project() {
metacello := Metacello new
baseline: 'SmalltalkCI';
repository: 'filetree://$(resolve_path "${SMALLTALK_CI_HOME}/repository")';
onUpgrade: [ :ex | ex useIncoming ].
onUpgrade: [ :ex | ex useIncoming ];
ignoreImage.
(Metacello canUnderstand: #onConflictUseIncoming)
ifTrue: [ metacello onConflictUseIncoming ]
ifFalse: [ metacello onConflict: [ :ex | ex useIncoming ] ].
metacello load ]
on: Warning
do: [ :w | w resume ].
([ Smalltalk at: #MetacelloIgnorePackageLoaded ]
on: KeyNotFound
do: [ :keyEx | keyEx resumeUnchecked: nil ])
ifNil: [ metacello load ]
ifNotNil: [ :exceptionClass |
[ metacello load ] on: exceptionClass do: [ :ex | ex resume: true ] ] ]
on: Warning
do: [ :w | w resume ].
Smalltalk at: #SmalltalkCI ].
smalltalkCI test: '$(resolve_path "${config_ston}")'
"
Expand Down
28 changes: 20 additions & 8 deletions pharo/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -367,13 +367,19 @@ pharo::load_project() {
metacello := Metacello new
baseline: 'SmalltalkCI';
repository: 'filetree://$(resolve_path "${SMALLTALK_CI_HOME}/repository")';
onUpgrade: [ :ex | ex useIncoming ].
onUpgrade: [ :ex | ex useIncoming ];
ignoreImage.
(Metacello canUnderstand: #onConflictUseIncoming)
ifTrue: [ metacello onConflictUseIncoming ]
ifFalse: [ metacello onConflict: [ :ex | ex useIncoming ] ].
metacello load ]
on: Warning
do: [ :w | w resume ].
([ Smalltalk at: #MetacelloIgnorePackageLoaded ]
on: KeyNotFound
do: [ :keyEx | keyEx resumeUnchecked: nil ])
ifNil: [ metacello load ]
ifNotNil: [ :exceptionClass |
[ metacello load ] on: exceptionClass do: [ :ex | ex resume: true ] ] ]
on: Warning
do: [ :w | w resume ].
smalltalkCI := Smalltalk at: #SmalltalkCI.
smalltalkCI load: '$(resolve_path "${config_ston}")'.
(smalltalkCI isHeadless or: [ smalltalkCI promptToProceed ])
Expand All @@ -395,13 +401,19 @@ pharo::test_project() {
metacello := Metacello new
baseline: 'SmalltalkCI';
repository: 'filetree://$(resolve_path "${SMALLTALK_CI_HOME}/repository")';
onUpgrade: [ :ex | ex useIncoming ].
onUpgrade: [ :ex | ex useIncoming ];
ignoreImage.
(Metacello canUnderstand: #onConflictUseIncoming)
ifTrue: [ metacello onConflictUseIncoming ]
ifFalse: [ metacello onConflict: [ :ex | ex useIncoming ] ].
metacello load ]
on: Warning
do: [ :w | w resume ].
([ Smalltalk at: #MetacelloIgnorePackageLoaded ]
on: KeyNotFound
do: [ :keyEx | keyEx resumeUnchecked: nil ])
ifNil: [ metacello load ]
ifNotNil: [ :exceptionClass |
[ metacello load ] on: exceptionClass do: [ :ex | ex resume: true ] ] ]
on: Warning
do: [ :w | w resume ].
Smalltalk at: #SmalltalkCI ].
smalltalkCI test: '$(resolve_path "${config_ston}")'
"
Expand Down

0 comments on commit f8a35da

Please sign in to comment.