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

Move ClassDefinitionPrinters loading later in the bootstrap process #17661

Open
wants to merge 3 commits into
base: Pharo13
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bootstrap/scripts/4-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ ${VM} "${COMPILER_IMAGE_NAME}.image" "${IMAGE_FLAGS}" perform --save SystemVers

${VM} "${COMPILER_IMAGE_NAME}.image" "${IMAGE_FLAGS}" loadHermes InitializePackagesCommandLineHandler.hermes --save

${VM} "${COMPILER_IMAGE_NAME}.image" "${IMAGE_FLAGS}" loadHermes Collections-Atomic.hermes AST-Core.hermes Collections-Arithmetic.hermes ClassDefinitionPrinters.hermes System-SourcesCondenser.hermes System-NumberPrinting.hermes --save --no-fail-on-undeclared
${VM} "${COMPILER_IMAGE_NAME}.image" "${IMAGE_FLAGS}" loadHermes Collections-Atomic.hermes AST-Core.hermes Collections-Arithmetic.hermes System-SourcesCondenser.hermes System-NumberPrinting.hermes --save --no-fail-on-undeclared

echo $(date -u) "[Compiler] Initializing the packages in the Kernel"
${VM} "${COMPILER_IMAGE_NAME}.image" "${IMAGE_FLAGS}" initializePackages --protocols=protocolsKernel.txt --packages --save
Expand Down
4 changes: 3 additions & 1 deletion src/BaselineOfBasicTools/BaselineOfBasicTools.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ BaselineOfBasicTools >> baseline: spec [
spec
loads: 'Core';
repository: repository ].


spec package: 'ClassDefinitionPrinters'.
spec package: 'Tool-ProcessBrowser'.
spec package: 'Tool-Profilers'.
spec package: 'NECompletion'.
Expand All @@ -73,6 +74,7 @@ BaselineOfBasicTools >> baseline: spec [
spec package: 'MonticelloGUI' with: [ spec requires: #( 'Tool-Diff' ) ].
spec package: 'System-Sources-Tests'. "<= Not sure this one should be here but it is where the classes were loaded before been extracted from Tests package."

spec package: 'ClassDefinitionPrinters-Tests'.
spec package: 'Kernel-CodeModel-Tests'.
spec package: 'Monticello-Tests'.
spec package: 'MonticelloGUI-Tests'.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ BaselineOfPharoBootstrap >> baseline: spec [
spec package: 'Collections-Support'.
spec package: 'Collections-Unordered'.
spec package: 'Collections-Weak'.
spec package: 'ClassDefinitionPrinters'.
spec package: 'Debugging-Core'.
spec package: 'Files'.
spec package: 'FileSystem-Path'.
Expand Down Expand Up @@ -206,7 +205,6 @@ BaselineOfPharoBootstrap >> baseline: spec [
'Collections-Atomic'.
'CodeImport'.
'CodeImportCommandLineHandlers'.
'ClassDefinitionPrinters'.
'System-SourcesCondenser'.
'Debugging-Utils'.
'OpalCompiler-Core'}.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
Class {
#name : 'ClassDefinitionPrinterConfigurationTest',
#superclass : 'CommonClassDefinitionPrinterTest',
#category : 'Kernel-Tests-Fluid',
#package : 'Kernel-Tests',
#tag : 'Fluid'
#category : 'ClassDefinitionPrinters-Tests',
#package : 'ClassDefinitionPrinters-Tests'
}

{ #category : 'tests' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ Class {
#instVars : [
'slotDisplay'
],
#category : 'Kernel-Tests-Fluid',
#package : 'Kernel-Tests',
#tag : 'Fluid'
#category : 'ClassDefinitionPrinters-Tests',
#package : 'ClassDefinitionPrinters-Tests'
}

{ #category : 'running' }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
Class {
#name : 'FluidClassDefinitionPrinterTest',
#superclass : 'CommonClassDefinitionPrinterTest',
#category : 'Kernel-Tests-Fluid',
#package : 'Kernel-Tests',
#tag : 'Fluid'
#category : 'ClassDefinitionPrinters-Tests',
#package : 'ClassDefinitionPrinters-Tests'
}

{ #category : 'helpers' }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
Class {
#name : 'LegacyClassDefinitionPrinterTest',
#superclass : 'CommonClassDefinitionPrinterTest',
#category : 'Kernel-Tests-Fluid',
#package : 'Kernel-Tests',
#tag : 'Fluid'
#category : 'ClassDefinitionPrinters-Tests',
#package : 'ClassDefinitionPrinters-Tests'
}

{ #category : 'helpers' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ Class {
#instVars : [
'#aComplexSlot => ObservableSlot'
],
#category : 'Kernel-Tests-Fluid',
#package : 'Kernel-Tests',
#tag : 'Fluid'
#category : 'ClassDefinitionPrinters-Tests',
#package : 'ClassDefinitionPrinters-Tests'
}

{ #category : 'initialization' }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
Class {
#name : 'OldClassDefinitionPrinterTest',
#superclass : 'CommonClassDefinitionPrinterTest',
#category : 'Kernel-Tests-Fluid',
#package : 'Kernel-Tests',
#tag : 'Fluid'
#category : 'ClassDefinitionPrinters-Tests',
#package : 'ClassDefinitionPrinters-Tests'
}

{ #category : 'tests - expanded' }
Expand Down
1 change: 1 addition & 0 deletions src/ClassDefinitionPrinters-Tests/package.st
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Package { #name : 'ClassDefinitionPrinters-Tests' }
9 changes: 0 additions & 9 deletions src/ClassDefinitionPrinters/ByteLayout.extension.st

This file was deleted.

10 changes: 0 additions & 10 deletions src/ClassDefinitionPrinters/CompiledMethodLayout.extension.st

This file was deleted.

9 changes: 0 additions & 9 deletions src/ClassDefinitionPrinters/DoubleByteLayout.extension.st

This file was deleted.

9 changes: 0 additions & 9 deletions src/ClassDefinitionPrinters/DoubleWordLayout.extension.st

This file was deleted.

9 changes: 0 additions & 9 deletions src/ClassDefinitionPrinters/EphemeronLayout.extension.st

This file was deleted.

9 changes: 0 additions & 9 deletions src/ClassDefinitionPrinters/ImmediateLayout.extension.st

This file was deleted.

10 changes: 0 additions & 10 deletions src/ClassDefinitionPrinters/ObjectLayout.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,3 @@ ObjectLayout >> subclassDefiningSymbol [
supported"
^self class subclassDefiningSymbol
]

{ #category : '*ClassDefinitionPrinters' }
ObjectLayout class >> subclassDefiningSymbol [
"Answer a keyword that describes the receiver's kind of subclass
Note: this is for printing the ST80 style class definiton, usage makes no sense for anything
else!"
"As a fallback we just return a standard class creation symbol. This will be called for user
defined Layouts, for old style class definitions that can not support user defined Layouts"
^#subclass:
]
9 changes: 0 additions & 9 deletions src/ClassDefinitionPrinters/VariableLayout.extension.st

This file was deleted.

9 changes: 0 additions & 9 deletions src/ClassDefinitionPrinters/WeakLayout.extension.st

This file was deleted.

9 changes: 0 additions & 9 deletions src/ClassDefinitionPrinters/WordLayout.extension.st

This file was deleted.

8 changes: 8 additions & 0 deletions src/Kernel-CodeModel/ByteLayout.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ ByteLayout class >> extending: superLayout scope: aScope host: aClass [
yourself
]

{ #category : 'description' }
ByteLayout class >> subclassDefiningSymbol [
"Answer a keyword that describes the receiver's kind of subclass
Note: this is for printing the ST80 style class definiton, usage makes no sense for anything
else!"
^#variableByteSubclass:
]

{ #category : 'accessing' }
ByteLayout >> bytesPerSlot [

Expand Down
9 changes: 9 additions & 0 deletions src/Kernel-CodeModel/CompiledMethodLayout.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ CompiledMethodLayout class >> extending: superLayout scope: aScope host: aClass
yourself
]

{ #category : 'description' }
CompiledMethodLayout class >> subclassDefiningSymbol [
"Answer a keyword that describes the receiver's kind of subclass
Note: this is for printing the ST80 style class definiton, usage makes no sense for anything
else!"
"there is no way to define classes of this Layput, the system shows them as variable classes"
^#variableByteSubclass:
]

{ #category : 'extending' }
CompiledMethodLayout >> extend [
self error: 'CompiledMethodLayout can not be extendend'
Expand Down
8 changes: 8 additions & 0 deletions src/Kernel-CodeModel/DoubleByteLayout.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ DoubleByteLayout class >> extending: superLayout scope: aScope host: aClass [
yourself
]

{ #category : 'description' }
DoubleByteLayout class >> subclassDefiningSymbol [
"Answer a keyword that describes the receiver's kind of subclass
Note: this is for printing the ST80 style class definiton, usage makes no sense for anything
else!"
^#variableDoubleByteSubclass:
]

{ #category : 'accessing' }
DoubleByteLayout >> bytesPerSlot [

Expand Down
8 changes: 8 additions & 0 deletions src/Kernel-CodeModel/DoubleWordLayout.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ DoubleWordLayout class >> extending: superLayout scope: aScope host: aClass [
yourself
]

{ #category : 'description' }
DoubleWordLayout class >> subclassDefiningSymbol [
"Answer a keyword that describes the receiver's kind of subclass
Note: this is for printing the ST80 style class definiton, usage makes no sense for anything
else!"
^#variableDoubleWordSubclass:
]

{ #category : 'extending' }
DoubleWordLayout >> extendDoubleWord [
^ DoubleWordLayout new
Expand Down
8 changes: 8 additions & 0 deletions src/Kernel-CodeModel/EphemeronLayout.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ EphemeronLayout class >> extending: superLayout scope: aScope host: aClass [
yourself
]

{ #category : 'description' }
EphemeronLayout class >> subclassDefiningSymbol [
"Answer a keyword that describes the receiver's kind of subclass
Note: this is for printing the ST80 style class definiton, usage makes no sense for anything
else!"
^#ephemeronSubclass:
]

{ #category : 'format' }
EphemeronLayout >> instanceSpecification [
^ 5
Expand Down
8 changes: 8 additions & 0 deletions src/Kernel-CodeModel/ImmediateLayout.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ ImmediateLayout class >> extending: superLayout scope: aScope host: aClass [
yourself
]

{ #category : 'description' }
ImmediateLayout class >> subclassDefiningSymbol [
"Answer a keyword that describes the receiver's kind of subclass
Note: this is for printing the ST80 style class definiton, usage makes no sense for anything
else!"
^#immediateSubclass:
]

{ #category : 'extending' }
ImmediateLayout >> extend [
self error: 'ImmediateLayout can not be extendend'
Expand Down
10 changes: 10 additions & 0 deletions src/Kernel-CodeModel/ObjectLayout.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ ObjectLayout class >> layoutForSubclassDefiningSymbol: aSymbol [
ifNone: [ FixedLayout ]
]

{ #category : 'description' }
ObjectLayout class >> subclassDefiningSymbol [
"Answer a keyword that describes the receiver's kind of subclass
Note: this is for printing the ST80 style class definiton, usage makes no sense for anything
else!"
"As a fallback we just return a standard class creation symbol. This will be called for user
defined Layouts, for old style class definitions that can not support user defined Layouts"
^#subclass:
]

{ #category : 'extending' }
ObjectLayout >> extend [
"Answer a default extension of me."
Expand Down
8 changes: 8 additions & 0 deletions src/Kernel-CodeModel/VariableLayout.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ VariableLayout class >> extending: superLayout scope: aScope host: aClass [
yourself
]

{ #category : 'description' }
VariableLayout class >> subclassDefiningSymbol [
"Answer a keyword that describes the receiver's kind of subclass
Note: this is for printing the ST80 style class definiton, usage makes no sense for anything
else!"
^#variableSubclass:
]

{ #category : 'format' }
VariableLayout >> instanceSpecification [
^ self hasFields
Expand Down
8 changes: 8 additions & 0 deletions src/Kernel-CodeModel/WeakLayout.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ WeakLayout class >> extending: superLayout scope: aScope host: aClass [
yourself
]

{ #category : 'description' }
WeakLayout class >> subclassDefiningSymbol [
"Answer a keyword that describes the receiver's kind of subclass
Note: this is for printing the ST80 style class definiton, usage makes no sense for anything
else!"
^#weakSubclass:
]

{ #category : 'format' }
WeakLayout >> instanceSpecification [
^ 4
Expand Down
8 changes: 8 additions & 0 deletions src/Kernel-CodeModel/WordLayout.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ WordLayout class >> extending: superLayout scope: aScope host: aClass [
yourself
]

{ #category : 'description' }
WordLayout class >> subclassDefiningSymbol [
"Answer a keyword that describes the receiver's kind of subclass
Note: this is for printing the ST80 style class definiton, usage makes no sense for anything
else!"
^#variableWordSubclass:
]

{ #category : 'accessing' }
WordLayout >> bytesPerSlot [

Expand Down