diff --git a/.github/scripts/preLoading.st b/.github/scripts/preLoading.st deleted file mode 100644 index 3eb1cbe92e..0000000000 --- a/.github/scripts/preLoading.st +++ /dev/null @@ -1,3 +0,0 @@ -#( 'BaselineOfLibGit' 'BaselineOfIceberg' ) do: [ :each | - (RPackageOrganizer default packageNamed: each ifAbsent: [ nil ]) - ifNotNil: [ :aPackage | aPackage removeFromSystem ] ] diff --git a/.github/scripts/preTesting.st b/.github/scripts/preTesting.st deleted file mode 100644 index 7136993914..0000000000 --- a/.github/scripts/preTesting.st +++ /dev/null @@ -1,3 +0,0 @@ -"Adding this to pass a release test that does not has sense to run here" -(FileLocator imageDirectory / 'pharo.version') writeStreamDo: [ :stream | - stream << (SystemVersion current major asString, SystemVersion current minor asString) ] diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1592af0894..89c428c23a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,16 +32,11 @@ jobs: runs-on: ${{ matrix.os }} name: ${{ matrix.smalltalk }} on ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup smalltalkCI uses: hpi-swa/setup-smalltalkCI@v1 with: - smalltalk-image: ${{ matrix.smalltalk }} -# - name: Load Image and Run Release Tests -# run: smalltalkci -s ${{ matrix.smalltalk }} .smalltalk.release.ston -# timeout-minutes: 10 -# - name: Clean Up -# run: rm -Rf ${{ env.SMALLTALK_CI_BUILD }} + smalltalk-version: ${{ matrix.smalltalk }} - name: Load Image and Run Tests run: smalltalkci -s ${{ matrix.smalltalk }} ${{ matrix.ston }} shell: bash diff --git a/.project b/.project index 078c63e532..ac2d93a83c 100644 --- a/.project +++ b/.project @@ -1,4 +1,3 @@ { - 'srcDirectory' : '', - 'tags' : [ #system ] + 'srcDirectory' : '' } diff --git a/.smalltalk.release.ston b/.smalltalk.release.ston deleted file mode 100644 index 9ec58385eb..0000000000 --- a/.smalltalk.release.ston +++ /dev/null @@ -1,18 +0,0 @@ -SmalltalkCISpec { - #loading : [ - SCIMetacelloLoadSpec { - #baseline : 'Iceberg', - #onConflict : #useIncoming, - #onUpgrade : #useIncoming, - #ignoreImage : true, - #onWarningLog : true, - #load : [ 'development' ] - } - ], - #preTesting : [ '.github/scripts/preTesting.st' ], - #testing : { - #packages : [ - 'System-Settings-Tests.*', - 'ReleaseTests.*' ] - } -} diff --git a/BaselineOfIceberg/BaselineOfIceberg.class.st b/BaselineOfIceberg/BaselineOfIceberg.class.st index 96dcdeed61..9c25c6ea8b 100644 --- a/BaselineOfIceberg/BaselineOfIceberg.class.st +++ b/BaselineOfIceberg/BaselineOfIceberg.class.st @@ -17,7 +17,6 @@ BaselineOfIceberg >> baseline: spec [ self tonel: spec. self libgit: spec. - self ring2: spec. spec "iceberg" @@ -31,7 +30,7 @@ BaselineOfIceberg >> baseline: spec [ package: 'Iceberg-TipUI' with: [ spec requires: #('Iceberg') ]; package: 'Iceberg-Memory' with: [ spec requires: #('Iceberg') ]; "tests" - package: 'Iceberg-Tests' with: [ spec requires: #('Iceberg' 'Iceberg-Memory' 'Ring2') ]; + package: 'Iceberg-Tests' with: [ spec requires: #('Iceberg' 'Iceberg-Memory') ]; package: 'Iceberg-Tests-MetacelloIntegration' with: [ spec requires: #('Iceberg-Tests') ]; package: 'Iceberg-UI-Tests' with: [ spec requires: #('Iceberg-TipUI' 'Iceberg-Tests')]; package: 'Iceberg-Plugin-Migration-Tests' with: [ spec requires: #('Iceberg-Plugin-Migration' 'Iceberg-Tests') ]; @@ -125,13 +124,6 @@ BaselineOfIceberg >> resetKMRepository [ ifPresent: [ :class | class reset ] ] -{ #category : 'baseline' } -BaselineOfIceberg >> ring2: spec [ - spec - baseline: 'Ring2' - with: [ spec repository: 'github://guillep/Ring2:v2.0.0/src' ] -] - { #category : 'baseline' } BaselineOfIceberg >> tonel: spec [ spec diff --git a/Iceberg-Memory/IceMemoryCommit.class.st b/Iceberg-Memory/IceMemoryCommit.class.st index 6566600ed9..712cf67a70 100644 --- a/Iceberg-Memory/IceMemoryCommit.class.st +++ b/Iceberg-Memory/IceMemoryCommit.class.st @@ -15,8 +15,11 @@ Class { { #category : 'comparing' } IceMemoryCommit >> = aCommit [ - ^ (self mcCommit dependencies asArray sort: [ :a :b | a timeStamp > b timeStamp ]) - = (aCommit mcCommit dependencies asArray sort: [ :a :b | a timeStamp > b timeStamp ]) + self == aCommit ifTrue: [ ^ true ]. + + self species = aCommit species ifFalse: [ ^ false ]. + + ^ self mcCommit dependencies asSet = aCommit mcCommit dependencies asSet ] { #category : 'accessing' } diff --git a/Iceberg-Memory/IceMemoryRepository.class.st b/Iceberg-Memory/IceMemoryRepository.class.st index e07eae0d14..5c2833c36e 100644 --- a/Iceberg-Memory/IceMemoryRepository.class.st +++ b/Iceberg-Memory/IceMemoryRepository.class.st @@ -63,10 +63,7 @@ IceMemoryRepository class >> exampleWithChanges [ anotherPackageName := 'AnotherNonExistentPackage' asSymbol. repository := self exampleWithNoChanges. repository workingCopy addPackageNamed: anotherPackageName. - Object subclass: 'IceGeneratedClassForUI' - instanceVariableNames: '' - classVariableNames: '' - package: anotherPackageName. + (Object << 'IceGeneratedClassForUI' package: anotherPackageName) install. self assert: repository isModified. ^ repository ] diff --git a/Iceberg-Memory/IceRingWorkingCopy.class.st b/Iceberg-Memory/IceRingWorkingCopy.class.st index c0571d4cd6..621662bf80 100644 --- a/Iceberg-Memory/IceRingWorkingCopy.class.st +++ b/Iceberg-Memory/IceRingWorkingCopy.class.st @@ -10,9 +10,10 @@ Class { { #category : 'helpers' } IceRingWorkingCopy >> addClassVariable: aVariableName to: aClassName [ + | class | class := ringEnvironment ensureClassNamed: aClassName. - class addClassVariable: (RG2ClassVariableDefinition named: aVariableName asSymbol parent: class ). + class addClassVariable: (RGClassVariable named: aVariableName asSymbol parent: class) ] { #category : 'private-impacting-changes' } @@ -139,7 +140,7 @@ IceRingWorkingCopy >> environment [ IceRingWorkingCopy >> initialize [ super initialize. - ringEnvironment := RG2Environment new. + ringEnvironment := RGEnvironment new. ] { #category : 'packages' } @@ -169,7 +170,7 @@ IceRingWorkingCopy >> loadPackagesNamed: packageNames fromCommit: aCommit [ fromCommit: aCommit package: package) mcSnapshot. - snapshot ring2ImportInto: ringEnvironment asPackageNamed: packageName. + snapshot importInto: ringEnvironment asPackageNamed: packageName. package beClean. ]. self referenceCommit: aCommit diff --git a/Iceberg-Memory/IceRingWorkingCopyChangerVisitor.class.st b/Iceberg-Memory/IceRingWorkingCopyChangerVisitor.class.st index 188ba5bc1a..0bd002e277 100644 --- a/Iceberg-Memory/IceRingWorkingCopyChangerVisitor.class.st +++ b/Iceberg-Memory/IceRingWorkingCopyChangerVisitor.class.st @@ -180,8 +180,8 @@ IceRingWorkingCopyChangerVisitor >> visitTraitDefinition: anIceTraitDefinition [ inPackage: package name with: [ :trait | | composition transformations | - composition := RG2TraitCompositionDefinition parent: trait. - transformations := RG2TraitCompositionVisitor new + composition := RGTraitComposition parent: trait. + transformations := RGTraitCompositionVisitor new parse: anIceTraitDefinition asMCDefinition traitComposition for: composition. trait traitComposition: composition. diff --git a/Iceberg-Memory/ManifestIcebergMemory.class.st b/Iceberg-Memory/ManifestIcebergMemory.class.st new file mode 100644 index 0000000000..307731660f --- /dev/null +++ b/Iceberg-Memory/ManifestIcebergMemory.class.st @@ -0,0 +1,17 @@ +" +Please describe the package using the class comment of the included manifest class. The manifest class also includes other additional metadata for the package. These meta data are used by other tools such as the SmalllintManifestChecker and the critics Browser +" +Class { + #name : 'ManifestIcebergMemory', + #superclass : 'PackageManifest', + #category : 'Iceberg-Memory-Manifest', + #package : 'Iceberg-Memory', + #tag : 'Manifest' +} + +{ #category : 'meta-data - dependency analyser' } +ManifestIcebergMemory class >> manuallyResolvedDependencies [ + + + ^ #(#'Collections-Streams' #'Monticello-Model' #'FileSystem-Core' #'Collections-Abstract' #'Ring-Monticello') +] diff --git a/Iceberg-Tests/IceAbstractTestCase.class.st b/Iceberg-Tests/IceAbstractTestCase.class.st index 24009302d0..90abd2de5e 100644 --- a/Iceberg-Tests/IceAbstractTestCase.class.st +++ b/Iceberg-Tests/IceAbstractTestCase.class.st @@ -103,7 +103,7 @@ IceAbstractTestCase >> setUp [ { #category : 'running' } IceAbstractTestCase >> tearDown [ - fixture tearDown. + fixture ifNotNil: [ fixture tearDown ]. super tearDown. ] diff --git a/Iceberg-Tests/IceClassesCherryPickingTest.class.st b/Iceberg-Tests/IceClassesCherryPickingTest.class.st index 3226450f27..3d880b95fe 100644 --- a/Iceberg-Tests/IceClassesCherryPickingTest.class.st +++ b/Iceberg-Tests/IceClassesCherryPickingTest.class.st @@ -25,8 +25,8 @@ IceClassesCherryPickingTest >> testAddClassDependingInATrait [ inPackage: self packageName1 asSymbol with: [ :class | | composition transformations | - composition := RG2TraitCompositionDefinition parent: class. - transformations := RG2TraitCompositionVisitor new + composition := RGTraitComposition parent: class. + transformations := RGTraitCompositionVisitor new parse: 'TestTrait' for: composition. class traitComposition: composition. @@ -71,8 +71,8 @@ IceClassesCherryPickingTest >> testAddClassDependingInATraitWithComposition [ inPackage: self packageName1 asSymbol with: [ :class | | composition transformations | - composition := RG2TraitCompositionDefinition parent: class. - transformations := RG2TraitCompositionVisitor new + composition := RGTraitComposition parent: class. + transformations := RGTraitCompositionVisitor new parse: 'TestTrait - {#hello. #world}' for: composition. diff --git a/Iceberg-Tests/IceMethodCherryPickingTest.class.st b/Iceberg-Tests/IceMethodCherryPickingTest.class.st index 6f5558717d..c69707c3b0 100644 --- a/Iceberg-Tests/IceMethodCherryPickingTest.class.st +++ b/Iceberg-Tests/IceMethodCherryPickingTest.class.st @@ -427,6 +427,7 @@ IceMethodCherryPickingTest >> testAddMethodWithClassAndSuperclassAsDependency [ { #category : 'tests' } IceMethodCherryPickingTest >> testAddMethodWithClassVariableAsDependency [ + | commitToCherryPick diff mergeTree | self repository createBranch: 'b2'. @@ -434,29 +435,19 @@ IceMethodCherryPickingTest >> testAddMethodWithClassVariableAsDependency [ self repository workingCopy createClass: 'TestClass2' inPackage: self packageName1 asSymbol - with: [ :class | - class - addClassVariable: - (RG2ClassVariableDefinition - named: 'TestClassVariable' asSymbol - parent: class) ]. - self repository - commitWithMessage: 'Adding a test class with class variable'. + with: [ :class | class addClassVariable: (RGClassVariable named: 'TestClassVariable' asSymbol parent: class) ]. + self repository commitWithMessage: 'Adding a test class with class variable'. self repository workingCopy addPackageNamed: self packageName1. self repository workingCopy createClass: 'TestClass3' inPackage: self packageName1 asSymbol - with: - [ :class | class superclass: (class environment ask behaviorNamed: #TestClass2) ]. + with: [ :class | class superclass: (class environment ask behaviorNamed: #TestClass2) ]. self repository commitWithMessage: 'Adding another test class'. self repository workingCopy addPackageNamed: self packageName1. - self repository workingCopy - createMethod: 'm1 ^TestClassVariable' - inClass: 'TestClass3' asSymbol. - self repository - commitWithMessage: 'Adding method using test class variable'. + self repository workingCopy createMethod: 'm1 ^TestClassVariable' inClass: 'TestClass3' asSymbol. + self repository commitWithMessage: 'Adding method using test class variable'. commitToCherryPick := fixture repository head. @@ -465,38 +456,20 @@ IceMethodCherryPickingTest >> testAddMethodWithClassVariableAsDependency [ diff := mergeTree collect: [ :each | each chosenOperation ]. self assert: diff children size equals: 1. - self - assert: (diff / self packageName1) children size - equals: 4. + self assert: (diff / self packageName1) children size equals: 4. - self - assert: - (diff / self packageName1 / 'TestClass2') value - isAddition. - self - assert: - (diff / self packageName1 / 'TestClass2') - children size - equals: 0. + self assert: (diff / self packageName1 / 'TestClass2') value isAddition. + self assert: (diff / self packageName1 / 'TestClass2') children size equals: 0. - self - assert: - (diff / self packageName1 / 'TestClass3') value - isAddition. - self - assert: - (diff / self packageName1 / 'TestClass3') - children size - equals: 1. + self assert: (diff / self packageName1 / 'TestClass3') value isAddition. + self assert: (diff / self packageName1 / 'TestClass3') children size equals: 1. - self - assert: - (diff / self packageName1 / 'TestClass3' / 'm1') - value isAddition + self assert: (diff / self packageName1 / 'TestClass3' / 'm1') value isAddition ] { #category : 'tests' } IceMethodCherryPickingTest >> testAddMethodWithClassVariableAsDependencyWithSuperclassAlreadyCommited [ + | commitToCherryPick diff mergeTree | self repository createBranch: 'b2'. @@ -504,29 +477,19 @@ IceMethodCherryPickingTest >> testAddMethodWithClassVariableAsDependencyWithSupe self repository workingCopy createClass: 'TestClass' inPackage: self packageName1 asSymbol - with: [ :class | - class - addClassVariable: - (RG2ClassVariableDefinition - named: 'TestClassVariable' asSymbol - parent: class) ]. - self repository - commitWithMessage: 'Adding a test class with class variable'. + with: [ :class | class addClassVariable: (RGClassVariable named: 'TestClassVariable' asSymbol parent: class) ]. + self repository commitWithMessage: 'Adding a test class with class variable'. self repository workingCopy addPackageNamed: self packageName1. self repository workingCopy createClass: 'TestClass2' inPackage: self packageName1 asSymbol - with: - [ :class | class superclass: (class environment ask behaviorNamed: #TestClass) ]. + with: [ :class | class superclass: (class environment ask behaviorNamed: #TestClass) ]. self repository commitWithMessage: 'Adding another test class'. self repository workingCopy addPackageNamed: self packageName1. - self repository workingCopy - createMethod: 'm1 ^TestClassVariable' - inClass: 'TestClass2' asSymbol. - self repository - commitWithMessage: 'Adding method using test class variable'. + self repository workingCopy createMethod: 'm1 ^TestClassVariable' inClass: 'TestClass2' asSymbol. + self repository commitWithMessage: 'Adding method using test class variable'. commitToCherryPick := fixture repository head. @@ -535,28 +498,13 @@ IceMethodCherryPickingTest >> testAddMethodWithClassVariableAsDependencyWithSupe diff := mergeTree collect: [ :each | each chosenOperation ]. self assert: diff children size equals: 1. - self - assert: (diff / self packageName1) children size - equals: 3. + self assert: (diff / self packageName1) children size equals: 3. - self - assert: - (diff / self packageName1 / 'TestClass') value - isModification. + self assert: (diff / self packageName1 / 'TestClass') value isModification. - self - assert: - (diff / self packageName1 / 'TestClass2') value - isAddition. - self - assert: - (diff / self packageName1 / 'TestClass2') - children size - equals: 1. - self - assert: - (diff / self packageName1 / 'TestClass2' / 'm1') - value isAddition + self assert: (diff / self packageName1 / 'TestClass2') value isAddition. + self assert: (diff / self packageName1 / 'TestClass2') children size equals: 1. + self assert: (diff / self packageName1 / 'TestClass2' / 'm1') value isAddition ] { #category : 'tests' } diff --git a/Iceberg-Tests/IceParameterizedTestCase.class.st b/Iceberg-Tests/IceParameterizedTestCase.class.st index 1bda0f3054..ad43de34cb 100644 --- a/Iceberg-Tests/IceParameterizedTestCase.class.st +++ b/Iceberg-Tests/IceParameterizedTestCase.class.st @@ -139,12 +139,10 @@ IceParameterizedTestCase >> printOn: aStream [ IceParameterizedTestCase >> setUp [ super setUp. - oldShareRepositoriesBetweenImages := IceLibgitRepository - shareRepositoriesBetweenImages. + oldShareRepositoriesBetweenImages := IceLibgitRepository shareRepositoriesBetweenImages. IceLibgitRepository shareRepositoriesBetweenImages: false. provider := IceCredentialsProvider providerType. - IceCredentialsProvider providerType: - IceNonInteractiveCredentialsProvider. + IceCredentialsProvider providerType: IceNonInteractiveCredentialsProvider. self parameters do: [ :each | each activate ] ] diff --git a/Iceberg-Tests/IceRepositoryWithSingleRemoteTest.class.st b/Iceberg-Tests/IceRepositoryWithSingleRemoteTest.class.st index 9bd2157083..191a0481f3 100644 --- a/Iceberg-Tests/IceRepositoryWithSingleRemoteTest.class.st +++ b/Iceberg-Tests/IceRepositoryWithSingleRemoteTest.class.st @@ -31,11 +31,11 @@ IceRepositoryWithSingleRemoteTest >> testFetchUpdatesTrackedRemoteBranch [ | newCommit remoteTrackedBranches | self remoteRepository workingCopy addPackageNamed: 'AnotherPackage'. newCommit := self remoteRepository commitWithMessage: 'Another commit message'. - + self repository fetch. remoteTrackedBranches := self repository remoteTrackedBranches. self assert: remoteTrackedBranches size equals: 1. - self assert: self repository remoteTrackedBranches anyOne commit equals: newCommit + self assert: remoteTrackedBranches anyOne commit equals: newCommit ] { #category : 'tests-checkout' } diff --git a/Iceberg-Tests/IceSinglePackageLocalRepositoryTest.class.st b/Iceberg-Tests/IceSinglePackageLocalRepositoryTest.class.st index 15e4c35637..c0825ed05c 100644 --- a/Iceberg-Tests/IceSinglePackageLocalRepositoryTest.class.st +++ b/Iceberg-Tests/IceSinglePackageLocalRepositoryTest.class.st @@ -165,14 +165,14 @@ IceSinglePackageLocalRepositoryTest >> testChangeClassWithClassSideTraitsComposi self repository workingCopy createClass: 'IceGeneratedClassForTesting' inPackage: self packageName1 asSymbol with: [ :class | | composition transformations classSideComposition classSideTransformations| - composition := RG2TraitCompositionDefinition parent: class. - transformations := RG2TraitCompositionVisitor new parse: 'T1' for: composition. + composition := RGTraitComposition parent: class. + transformations := RGTraitCompositionVisitor new parse: 'T1' for: composition. class traitComposition: composition. transformations do: [ :each | composition addTransformation: each ]. - classSideComposition := RG2TraitCompositionDefinition parent: class classSide. - classSideTransformations := RG2TraitCompositionVisitor new + classSideComposition := RGTraitComposition parent: class classSide. + classSideTransformations := RGTraitCompositionVisitor new parse: 'T1 classTrait - {#m1}' for: classSideComposition. class classSide traitComposition: classSideComposition. classSideTransformations do: [ :each | @@ -203,14 +203,14 @@ IceSinglePackageLocalRepositoryTest >> testChangeClassWithClassSideTraitsComposi self repository workingCopy createClass: 'IceGeneratedClassForTesting' inPackage: self packageName1 asSymbol with: [ :class | | composition transformations classSideComposition classSideTransformations| - composition := RG2TraitCompositionDefinition parent: class. - transformations := RG2TraitCompositionVisitor new parse: 'T1' for: composition. + composition := RGTraitComposition parent: class. + transformations := RGTraitCompositionVisitor new parse: 'T1' for: composition. class traitComposition: composition. transformations do: [ :each | composition addTransformation: each ]. - classSideComposition := RG2TraitCompositionDefinition parent: class classSide. - classSideTransformations := RG2TraitCompositionVisitor new + classSideComposition := RGTraitComposition parent: class classSide. + classSideTransformations := RGTraitCompositionVisitor new parse: 'T1 classTrait' for: classSideComposition. class classSide traitComposition: classSideComposition. classSideTransformations do: [ :each | @@ -221,14 +221,14 @@ IceSinglePackageLocalRepositoryTest >> testChangeClassWithClassSideTraitsComposi self repository workingCopy createClass: 'IceGeneratedClassForTesting' inPackage: self packageName1 asSymbol with: [ :class | | composition transformations classSideComposition classSideTransformations| - composition := RG2TraitCompositionDefinition parent: class. - transformations := RG2TraitCompositionVisitor new parse: 'T1' for: composition. + composition := RGTraitComposition parent: class. + transformations := RGTraitCompositionVisitor new parse: 'T1' for: composition. class traitComposition: composition. transformations do: [ :each | composition addTransformation: each ]. - classSideComposition := RG2TraitCompositionDefinition parent: class classSide. - classSideTransformations := RG2TraitCompositionVisitor new + classSideComposition := RGTraitComposition parent: class classSide. + classSideTransformations := RGTraitCompositionVisitor new parse: 'T1 classTrait - {#m1}' for: classSideComposition. class classSide traitComposition: classSideComposition. classSideTransformations do: [ :each | @@ -260,8 +260,8 @@ IceSinglePackageLocalRepositoryTest >> testChangeClassWithTraitsSideMakesIsExpor self repository workingCopy createClass: 'IceGeneratedClassForTesting' inPackage: self packageName1 asSymbol with: [ :class | | composition transformations | - composition := RG2TraitCompositionDefinition parent: class. - transformations := RG2TraitCompositionVisitor new parse: 'T1' for: composition. + composition := RGTraitComposition parent: class. + transformations := RGTraitCompositionVisitor new parse: 'T1' for: composition. class traitComposition: composition. transformations do: [ :each | composition addTransformation: each ] @@ -295,8 +295,8 @@ IceSinglePackageLocalRepositoryTest >> testChangeClassWithTraitsSideMakesIsExpor self repository workingCopy createClass: 'IceGeneratedClassForTesting' inPackage: self packageName1 asSymbol with: [ :class | | composition transformations | - composition := RG2TraitCompositionDefinition parent: class. - transformations := RG2TraitCompositionVisitor new parse: 'T1' for: composition. + composition := RGTraitComposition parent: class. + transformations := RGTraitCompositionVisitor new parse: 'T1' for: composition. class traitComposition: composition. transformations do: [ :each | composition addTransformation: each ] @@ -337,14 +337,14 @@ IceSinglePackageLocalRepositoryTest >> testChangeTraitWithClassSideTraitsComposi self repository workingCopy createTrait: 'T2' inPackage: self packageName1 asSymbol with: [ :class | | composition transformations classSideComposition classSideTransformations| - composition := RG2TraitCompositionDefinition parent: class. - transformations := RG2TraitCompositionVisitor new parse: 'T1' for: composition. + composition := RGTraitComposition parent: class. + transformations := RGTraitCompositionVisitor new parse: 'T1' for: composition. class traitComposition: composition. transformations do: [ :each | composition addTransformation: each ]. - classSideComposition := RG2TraitCompositionDefinition parent: class classSide. - classSideTransformations := RG2TraitCompositionVisitor new + classSideComposition := RGTraitComposition parent: class classSide. + classSideTransformations := RGTraitCompositionVisitor new parse: 'T1 classTrait' for: classSideComposition. class classSide traitComposition: classSideComposition. classSideTransformations do: [ :each | @@ -355,14 +355,14 @@ IceSinglePackageLocalRepositoryTest >> testChangeTraitWithClassSideTraitsComposi self repository workingCopy createTrait: 'T2' inPackage: self packageName1 asSymbol with: [ :class | | composition transformations classSideComposition classSideTransformations| - composition := RG2TraitCompositionDefinition parent: class. - transformations := RG2TraitCompositionVisitor new parse: 'T1' for: composition. + composition := RGTraitComposition parent: class. + transformations := RGTraitCompositionVisitor new parse: 'T1' for: composition. class traitComposition: composition. transformations do: [ :each | composition addTransformation: each ]. - classSideComposition := RG2TraitCompositionDefinition parent: class classSide. - classSideTransformations := RG2TraitCompositionVisitor new + classSideComposition := RGTraitComposition parent: class classSide. + classSideTransformations := RGTraitCompositionVisitor new parse: 'T1 classTrait - {#m1}' for: classSideComposition. class classSide traitComposition: classSideComposition. classSideTransformations do: [ :each | @@ -421,20 +421,18 @@ IceSinglePackageLocalRepositoryTest >> testCheckoutCodeRepositoryInstallsCodeInI | message | message := 'Added IceGeneratedClassForTesting'. - + "This is a Ring working copy" - self repository workingCopy - createClass: 'IceGeneratedClassForTesting' - inPackage: self packageName1 asSymbol. - + self repository workingCopy createClass: 'IceGeneratedClassForTesting' inPackage: self packageName1 asSymbol. + self repository commitWithMessage: message. - + self repository unload. - self deny: (RPackageOrganizer default includesPackageNamed: self packageName1). - + self deny: (RPackageOrganizer default hasPackage: self packageName1). + self repository head checkoutAllPackages. self assertClassExists: #IceGeneratedClassForTesting. - self assertPackageExists: self packageName1. + self assertPackageExists: self packageName1 ] { #category : 'tests-checkout' } @@ -451,18 +449,16 @@ IceSinglePackageLocalRepositoryTest >> testCheckoutCommitInstallsCodeInImage [ message := 'Added IceGeneratedClassForTesting'. "This is a Ring working copy" - self repository workingCopy - createClass: 'IceGeneratedClassForTesting' - inPackage: self packageName1 asSymbol. + self repository workingCopy createClass: 'IceGeneratedClassForTesting' inPackage: self packageName1 asSymbol. self repository commitWithMessage: message. - + self repository unload. - self deny: (RPackageOrganizer default includesPackageNamed: self packageName1). - + self deny: (RPackageOrganizer default hasPackage: self packageName1). + self repository branch commit checkoutAllPackages. self assertClassExists: #IceGeneratedClassForTesting. - self assertPackageExists: self packageName1. + self assertPackageExists: self packageName1 ] { #category : 'tests-checkout' } diff --git a/Iceberg-Tests/IceTraitsCherryPickingTest.class.st b/Iceberg-Tests/IceTraitsCherryPickingTest.class.st index aae53d3007..d9871e5d3b 100644 --- a/Iceberg-Tests/IceTraitsCherryPickingTest.class.st +++ b/Iceberg-Tests/IceTraitsCherryPickingTest.class.st @@ -23,8 +23,8 @@ IceTraitsCherryPickingTest >> testAddTraitDependingInATrait [ inPackage: self packageName1 asSymbol with: [ :class | | composition transformations | - composition := RG2TraitCompositionDefinition parent: class. - transformations := RG2TraitCompositionVisitor new + composition := RGTraitComposition parent: class. + transformations := RGTraitCompositionVisitor new parse: 'TestTrait' for: composition. class traitComposition: composition. @@ -72,8 +72,8 @@ IceTraitsCherryPickingTest >> testRemoveTraitUsedByAClass [ inPackage: self packageName1 asSymbol with: [ :class | | transformations composition | - composition := RG2TraitCompositionDefinition parent: class. - transformations := RG2TraitCompositionVisitor new + composition := RGTraitComposition parent: class. + transformations := RGTraitCompositionVisitor new parse: 'TestTraitInitial' for: composition. class traitComposition: composition. @@ -112,8 +112,8 @@ IceTraitsCherryPickingTest >> testRemoveTraitUsedByATrait [ inPackage: self packageName1 asSymbol with: [ :class | | transformations composition | - composition := (RG2TraitCompositionDefinition parent: class). - transformations := RG2TraitCompositionVisitor new + composition := (RGTraitComposition parent: class). + transformations := RGTraitCompositionVisitor new parse: 'TestTraitInitial' for: composition. diff --git a/Iceberg-Tests/RG2MetaclassTraitDefinition.extension.st b/Iceberg-Tests/RG2MetaclassTraitDefinition.extension.st deleted file mode 100644 index 3254182648..0000000000 --- a/Iceberg-Tests/RG2MetaclassTraitDefinition.extension.st +++ /dev/null @@ -1,10 +0,0 @@ -Extension { #name : 'RG2MetaclassTraitDefinition' } - -{ #category : '*Iceberg-Tests' } -RG2MetaclassTraitDefinition >> asMCDefinition [ - - ^ MCClassTraitDefinition - baseTraitName: baseTrait name - classTraitComposition: self traitCompositionString - category: self category -] diff --git a/Iceberg-Tests/RG2PackageDefinition.extension.st b/Iceberg-Tests/RG2PackageDefinition.extension.st deleted file mode 100644 index 7abc8170d7..0000000000 --- a/Iceberg-Tests/RG2PackageDefinition.extension.st +++ /dev/null @@ -1,20 +0,0 @@ -Extension { #name : 'RG2PackageDefinition' } - -{ #category : '*Iceberg-Tests' } -RG2PackageDefinition >> asMCSnapshot [ - - | definitions | - definitions := ((((self definedBehaviors reject: #isMeta) sorted: [ :a :b | a name < b name ]) collect: #asMCDefinition) - , (self extensionMethods collect: #asMCDefinition)) asOrderedCollection. - definitions addAll: (self definedBehaviors - select: [ :each | each isTrait and: [ each classSide hasTraitComposition ] ] - thenCollect: [ :aTrait | aTrait classSide asMCDefinition ]). - - definitions addAll: (self definedBehaviors , (self definedBehaviors collect: #classSide) flatCollect: [ :behavior | - behavior localMethods - select: [ :each | each parent instanceSide package = each package ] - thenCollect: [ :method | method asMCDefinition ] ]). - definitions add: (MCOrganizationDefinition packageName: name). - - ^ MCSnapshot fromDefinitions: definitions -] diff --git a/Iceberg-Tests/RG2TraitDefinition.extension.st b/Iceberg-Tests/RG2TraitDefinition.extension.st deleted file mode 100644 index 0e3c62a7e5..0000000000 --- a/Iceberg-Tests/RG2TraitDefinition.extension.st +++ /dev/null @@ -1,15 +0,0 @@ -Extension { #name : 'RG2TraitDefinition' } - -{ #category : '*Iceberg-Tests' } -RG2TraitDefinition >> asMCDefinition [ - - ^ MCTraitDefinition - name: self name - traitComposition: self traitCompositionString - category: self category - instVarNames: '' - classInstVarNames: '' - classTraitComposition: self classSide traitCompositionString - comment: self comment content - commentStamp: '' -] diff --git a/Iceberg-Tests/RG2UnresolvedValue.extension.st b/Iceberg-Tests/RG2UnresolvedValue.extension.st deleted file mode 100644 index 5cf171826e..0000000000 --- a/Iceberg-Tests/RG2UnresolvedValue.extension.st +++ /dev/null @@ -1,7 +0,0 @@ -Extension { #name : 'RG2UnresolvedValue' } - -{ #category : '*Iceberg-Tests' } -RG2UnresolvedValue >> remove: aRG2MethodDefinition [ - - "I am undefined, removing something is futil" -] diff --git a/Iceberg/IceWorkingCopy.class.st b/Iceberg/IceWorkingCopy.class.st index 8d7a44daba..0d6ffe7727 100644 --- a/Iceberg/IceWorkingCopy.class.st +++ b/Iceberg/IceWorkingCopy.class.st @@ -206,16 +206,13 @@ IceWorkingCopy >> changesTo: aCommitish [ | removedPackages changes | changes := Set new. - + changes addAll: (aCommitish changesFromCommit: self referenceCommit). removedPackages := aCommitish packages \ self packages. - changes addAll: (((self modifiedPackages, removedPackages) collect: [ :each | - IceImageChange package: each ])). - - self project isDirty - ifTrue: [ changes add: IceProjectChange new ]. - self repositoryProperties isDirty - ifTrue: [ changes add: IceCypressPropertiesChange new ]. + changes addAll: (self modifiedPackages , removedPackages collect: [ :each | IceImageChange package: each ]). + + self project isDirty ifTrue: [ changes add: IceProjectChange new ]. + self repositoryProperties isDirty ifTrue: [ changes add: IceCypressPropertiesChange new ]. ^ changes ] diff --git a/scripts/preLoading.st b/scripts/preLoading.st index 719a94d1bb..2714f931b9 100644 --- a/scripts/preLoading.st +++ b/scripts/preLoading.st @@ -12,12 +12,8 @@ Smalltalk globals at: #IceSystemEventListener ifPresent: #unregisterSystemAnnoun "Remove iceberg from system (so I can reload it)" MetacelloPharoPlatform select. #( - 'BaselineOfTonel' 'BaselineOfLibGit' 'BaselineOfIceberg' - 'MonticelloTonel-Core' - 'MonticelloTonel-FileSystem' - 'MonticelloTonel-Tests' 'Iceberg-UI' 'Iceberg-TipUI' 'Iceberg-Plugin-Pharo' @@ -46,20 +42,4 @@ do: [ :each | nil ]) ifNotNil: [ :package | ('Removing ', each) traceCr. - package removeFromSystem ] ]. - -"Loading Tonel before trying to load Iceberg. -This is required to load iceberg packages and dependencies in Tonel format" -Metacello new - baseline: 'Tonel'; - repository: 'github://pharo-vcs/tonel:v1.0.17'; - load. - -"Development branch requires latest Spec2" -Metacello new - githubUser: 'pharo-spec' project: 'Spec' commitish: 'Pharo10' path: 'src'; - baseline: 'Spec2'; - onConflict: [ :e | e useIncoming ]; - onUpgrade: [ :e | e useIncoming ]; - ignoreImage; - load + package removeFromSystem ] ]