From 40683d1da98e65f524db85865514ded256dc188b Mon Sep 17 00:00:00 2001 From: CyrilFerlicot Date: Fri, 31 Oct 2025 18:50:35 +0100 Subject: [PATCH] Move loading of UIManager from Hermes phase to BaselineOfUI Load the UIManager much later in the Pharo build. Also cut a dependency to the UIManager in Regex-Core --- bootstrap/scripts/4-build.sh | 2 +- bootstrap/scripts/runKernelTests.sh | 2 +- .../BaselineOfPharoBootstrap.class.st | 2 -- src/BaselineOfUI/BaselineOfUI.class.st | 3 +++ src/Morphic-Deprecated/UIManager.extension.st | 17 +++++++++++++++ src/Regex-Core/UIManager.extension.st | 21 ------------------- 6 files changed, 22 insertions(+), 25 deletions(-) delete mode 100644 src/Regex-Core/UIManager.extension.st diff --git a/bootstrap/scripts/4-build.sh b/bootstrap/scripts/4-build.sh index bac966d7ec6..491c2cb81ff 100755 --- a/bootstrap/scripts/4-build.sh +++ b/bootstrap/scripts/4-build.sh @@ -151,7 +151,7 @@ ${VM} "${COMPILER_IMAGE_NAME}.image" "${IMAGE_FLAGS}" perform --save PharoBootst # Installing compiler through Hermes echo $(date -u) "[Compiler] Installing compiler through Hermes" -${VM} "${COMPILER_IMAGE_NAME}.image" "${IMAGE_FLAGS}" loadHermes UIManager.hermes Debugging-Utils.hermes OpalCompiler-Core.hermes Deprecation.hermes DebugInfo.hermes CodeImport.hermes CodeImport-Commands.hermes --save --no-fail-on-undeclared +${VM} "${COMPILER_IMAGE_NAME}.image" "${IMAGE_FLAGS}" loadHermes Debugging-Utils.hermes OpalCompiler-Core.hermes Deprecation.hermes DebugInfo.hermes CodeImport.hermes CodeImport-Commands.hermes --save --no-fail-on-undeclared ${VM} "${COMPILER_IMAGE_NAME}.image" "${IMAGE_FLAGS}" eval --save "SystemEnvironment deprecatedAliases: { #SystemDictionary }." # This line should be removed in Pharo 14 since it is for backward compatibility. ${VM} "${COMPILER_IMAGE_NAME}.image" "${IMAGE_FLAGS}" st ${BOOTSTRAP_REPOSITORY}/bootstrap/scripts/01-initialization/01-init.st --no-source --save --quit diff --git a/bootstrap/scripts/runKernelTests.sh b/bootstrap/scripts/runKernelTests.sh index d11031d8bce..2939db4e648 100755 --- a/bootstrap/scripts/runKernelTests.sh +++ b/bootstrap/scripts/runKernelTests.sh @@ -61,7 +61,7 @@ export PHARO_CI_TESTING_ENVIRONMENT=1 #Adding packages removed from the bootstrap ./pharo bootstrap.image perform --save BasicHermesTool load: --as-array Clap-Core.hermes Clap-Commands-Pharo.hermes Hermes-Extensions.hermes ./pharo bootstrap.image perform --save Pragma buildCache -./pharo bootstrap.image loadHermes UIManager.hermes Math-Operations-Extensions.hermes System-Time.hermes NumberParser.hermes AST-Core.hermes Random-Core.hermes System-NumberPrinting.hermes --save --no-fail-on-undeclared --on-duplication ignore +./pharo bootstrap.image loadHermes Math-Operations-Extensions.hermes System-Time.hermes NumberParser.hermes AST-Core.hermes Random-Core.hermes System-NumberPrinting.hermes --save --no-fail-on-undeclared --on-duplication ignore #Initializing the package manager ./pharo bootstrap.image perform --save PharoBootstrapFixMethodsTool fixExtensionMethods diff --git a/src/BaselineOfPharoBootstrap/BaselineOfPharoBootstrap.class.st b/src/BaselineOfPharoBootstrap/BaselineOfPharoBootstrap.class.st index d2862b0de44..ca88d480c97 100644 --- a/src/BaselineOfPharoBootstrap/BaselineOfPharoBootstrap.class.st +++ b/src/BaselineOfPharoBootstrap/BaselineOfPharoBootstrap.class.st @@ -122,7 +122,6 @@ BaselineOfPharoBootstrap >> baseline: spec [ spec package: 'System-Sources'. spec package: 'System-Support'. - spec package: 'UIManager'. spec package: 'Zinc-Character-Encoding-Core'. spec package: 'FFI-Kernel'. @@ -196,7 +195,6 @@ BaselineOfPharoBootstrap >> baseline: spec [ 'Multilingual-Encodings' }. spec group: 'CompilerGroup' with: { - 'UIManager'. 'AST-Core'. 'Collections-Arithmetic'. 'Collections-Atomic'. diff --git a/src/BaselineOfUI/BaselineOfUI.class.st b/src/BaselineOfUI/BaselineOfUI.class.st index 05ebc92a17f..ec97c877319 100644 --- a/src/BaselineOfUI/BaselineOfUI.class.st +++ b/src/BaselineOfUI/BaselineOfUI.class.st @@ -38,6 +38,9 @@ BaselineOfUI >> baseline: spec [ repository := self packageRepositoryURLForSpec: spec. spec for: #common do: [ spec postLoadDoIt: #postload:package:. + + "This should go to Morphic but for now Debugger-Model still depends on it" + spec package: 'UIManager'. "Loading the debugger model and infrastructure before the UI" spec package: 'Debugger-Model'. diff --git a/src/Morphic-Deprecated/UIManager.extension.st b/src/Morphic-Deprecated/UIManager.extension.st index 53497f585c9..54de5046182 100644 --- a/src/Morphic-Deprecated/UIManager.extension.st +++ b/src/Morphic-Deprecated/UIManager.extension.st @@ -41,6 +41,23 @@ UIManager >> informUserDuring: aBlock [ during: [ :bar | aBlock value: bar ] ] +{ #category : '*Morphic-Deprecated' } +UIManager >> request: aTitleString regex: initialRegexString [ + "Prompt the user for a valid regex. + Return nil on cancel or a valid RxMatcher" + + | regex | + self deprecated: 'This method is too specific and will be removed in future versions of Pharo.'. + regex := initialRegexString. "loop until we get a valid regex string back" + [ + regex := self multiLineRequest: aTitleString initialAnswer: regex answerHeight: 200. "cancelled dialog ==> nil" + regex ifNil: [ ^ nil ]. + + [ ^ regex asRegex ] + on: Error + do: [ :regexParsingError | self defer: [ self inform: 'Bad Regex: ' , regexParsingError asString ] ] ] repeat +] + { #category : '*Morphic-Deprecated' } UIManager >> requestPassword: queryString [ "Create an instance of me whose question is queryString. Invoke it centered diff --git a/src/Regex-Core/UIManager.extension.st b/src/Regex-Core/UIManager.extension.st deleted file mode 100644 index a6a443fbd6b..00000000000 --- a/src/Regex-Core/UIManager.extension.st +++ /dev/null @@ -1,21 +0,0 @@ -Extension { #name : 'UIManager' } - -{ #category : '*Regex-Core' } -UIManager >> request: aTitleString regex: initialRegexString [ - "Prompt the user for a valid regex. - Return nil on cancel or a valid RxMatcher" - | regex | - regex := initialRegexString. - "loop until we get a valid regex string back" - [ - regex := self - multiLineRequest: aTitleString - initialAnswer: regex - answerHeight: 200. - "cancelled dialog ==> nil" - regex ifNil: [ ^ nil ]. - - [ ^ regex asRegex ] on: Error do: [ :regexParsingError| - self defer: [ self inform: 'Bad Regex: ', regexParsingError asString ]]. - ] repeat -]