Skip to content

Commit

Permalink
Merge bca617d
Browse files Browse the repository at this point in the history
  • Loading branch information
guillep committed Jan 18, 2024
2 parents e0f320f + bca617d commit e875f30
Show file tree
Hide file tree
Showing 781 changed files with 11,105 additions and 10,172 deletions.
3 changes: 0 additions & 3 deletions .github/scripts/preLoading.st

This file was deleted.

3 changes: 0 additions & 3 deletions .github/scripts/preTesting.st

This file was deleted.

13 changes: 4 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,24 @@ jobs:
# Default value means that a failure in one OS cancels all
fail-fast: false
matrix:
smalltalk: [ Pharo64-11 ]
smalltalk: [ Pharo64-12 ]
os: [ ubuntu-latest, macos-latest ]
ston: [ .smalltalk.ston ]
# Test Windows with some exclusions.
# At least a part of the problem is reported here:
# https://github.com/pharo-vcs/iceberg/issues/1394
include:
- smalltalk: Pharo64-11
- smalltalk: Pharo64-12
os: windows-latest
ston: .smalltalk.windows.ston
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
Expand Down
18 changes: 0 additions & 18 deletions .smalltalk.release.ston

This file was deleted.

35 changes: 14 additions & 21 deletions BaselineOfIceberg/BaselineOfIceberg.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
Baseline for https://github.com/pharo-vcs/iceberg project
"
Class {
#name : #BaselineOfIceberg,
#superclass : #BaselineOf,
#category : #BaselineOfIceberg
#name : 'BaselineOfIceberg',
#superclass : 'BaselineOf',
#category : 'BaselineOfIceberg',
#package : 'BaselineOfIceberg'
}

{ #category : #baseline }
{ #category : 'baseline' }
BaselineOfIceberg >> baseline: spec [
<baseline>

Expand All @@ -16,7 +17,6 @@ BaselineOfIceberg >> baseline: spec [

self tonel: spec.
self libgit: spec.
self ring2: spec.

spec
"iceberg"
Expand All @@ -30,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') ];
Expand Down Expand Up @@ -63,14 +63,14 @@ BaselineOfIceberg >> baseline: spec [

]

{ #category : #accessing }
{ #category : 'accessing' }
BaselineOfIceberg >> customProjectAttributes [
Smalltalk os isMacOS ifTrue: [ ^ #(#MacOS) ].
Smalltalk os isUnix ifTrue: [ ^ #(#Unix) ].
Smalltalk os isWindows ifTrue: [ ^ #(#Windows) ]
]

{ #category : #baseline }
{ #category : 'baseline' }
BaselineOfIceberg >> libgit: spec [
spec
baseline: 'LibGit'
Expand All @@ -84,14 +84,14 @@ BaselineOfIceberg >> libgit: spec [
with: [ spec loads: #('tests') ]
]

{ #category : #script }
{ #category : 'script' }
BaselineOfIceberg >> postLoad [

self resetKMRepository.
(Smalltalk at: #Iceberg) bootstrap
]

{ #category : #script }
{ #category : 'script' }
BaselineOfIceberg >> postLoadWithDirective: aDirective projectSpec: aSpec [
| repository |
self resetKMRepository.
Expand All @@ -108,7 +108,7 @@ BaselineOfIceberg >> postLoadWithDirective: aDirective projectSpec: aSpec [
packageList: aSpec packageNames
]

{ #category : #accessing }
{ #category : 'accessing' }
BaselineOfIceberg >> projectClass [
^ super projectClass
"this is breaking the bootstrap. Reverting it for now."
Expand All @@ -117,23 +117,16 @@ BaselineOfIceberg >> projectClass [
do: [ super projectClass ]"
]

{ #category : #script }
{ #category : 'script' }
BaselineOfIceberg >> resetKMRepository [
Smalltalk
at: #KMRepository
ifPresent: [ :class | class reset ]
]

{ #category : #baseline }
BaselineOfIceberg >> ring2: spec [
spec
baseline: 'Ring2'
with: [ spec repository: 'github://guillep/Ring2:v2.0.0/src' ]
]

{ #category : #baseline }
{ #category : 'baseline' }
BaselineOfIceberg >> tonel: spec [
spec
baseline: 'Tonel'
with: [ spec repository: 'github://pharo-vcs/tonel:v1.0.19' ]
with: [ spec repository: 'github://pharo-vcs/tonel:Pharo12' ]
]
2 changes: 1 addition & 1 deletion BaselineOfIceberg/package.st
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Package { #name : #BaselineOfIceberg }
Package { #name : 'BaselineOfIceberg' }
21 changes: 11 additions & 10 deletions Iceberg-ArchitecturalRules/IceLibgitRuleBreakerRepository.class.st
Original file line number Diff line number Diff line change
@@ -1,47 +1,48 @@
Class {
#name : #IceLibgitRuleBreakerRepository,
#superclass : #IceLibgitRepository,
#category : 'Iceberg-ArchitecturalRules'
#name : 'IceLibgitRuleBreakerRepository',
#superclass : 'IceLibgitRepository',
#category : 'Iceberg-ArchitecturalRules',
#package : 'Iceberg-ArchitecturalRules'
}

{ #category : #tests }
{ #category : 'tests' }
IceLibgitRuleBreakerRepository >> testDefinedRepositoryAccessor [

<repositoryHandleAccessor>
^ handle
]

{ #category : #tests }
{ #category : 'tests' }
IceLibgitRuleBreakerRepository >> testMethodAccessHandleDirectly [

^ handle allBranches
]

{ #category : #tests }
{ #category : 'tests' }
IceLibgitRuleBreakerRepository >> testMethodAccessHandleDirectlyWithErrorHandler [

self handleLibgitError: [handle allBranches]
]

{ #category : #tests }
{ #category : 'tests' }
IceLibgitRuleBreakerRepository >> testMethodAccessHandleThroughAccessor [

^ self testDefinedRepositoryAccessor allBranches
]

{ #category : #tests }
{ #category : 'tests' }
IceLibgitRuleBreakerRepository >> testMethodAccessHandleThroughAccessorWithErrorHandler [

self handleLibgitError: [ self testDefinedRepositoryAccessor allBranches]
]

{ #category : #tests }
{ #category : 'tests' }
IceLibgitRuleBreakerRepository >> testMethodNotBreakingRule [

^ 1+1
]

{ #category : #tests }
{ #category : 'tests' }
IceLibgitRuleBreakerRepository >> testNonDefinedRepositoryAccessor [

^ handle
Expand Down
19 changes: 10 additions & 9 deletions Iceberg-ArchitecturalRules/IceShouldHandleLibgitErrors.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@ Otherwise, libgit errors may be thrown to the user and produce ugly effects. E.g
- Libgit errors are criptyc and can only be understood by reading the message text...
"
Class {
#name : #IceShouldHandleLibgitErrors,
#superclass : #ReAbstractRule,
#category : 'Iceberg-ArchitecturalRules'
#name : 'IceShouldHandleLibgitErrors',
#superclass : 'ReAbstractRule',
#category : 'Iceberg-ArchitecturalRules',
#package : 'Iceberg-ArchitecturalRules'
}

{ #category : #'testing-interest' }
{ #category : 'testing-interest' }
IceShouldHandleLibgitErrors class >> checksNode [

^ true
]

{ #category : #running }
{ #category : 'running' }
IceShouldHandleLibgitErrors >> check: aNode forCritiquesDo: aBlock [

"Detect strange case where method node is nil"
Expand All @@ -44,21 +45,21 @@ IceShouldHandleLibgitErrors >> check: aNode forCritiquesDo: aBlock [
ifFalse: [ aBlock cull: (self critiqueFor: aNode) ]
]

{ #category : #accessing }
{ #category : 'accessing' }
IceShouldHandleLibgitErrors >> group [

^ 'Architectural'
]

{ #category : #accessing }
{ #category : 'accessing' }
IceShouldHandleLibgitErrors >> libgitRepositoryHandleAccessorsForClass: aClass [

^ aClass allMethods
select:
[ :m | m pragmas anySatisfy: [ :p | p keyword = IceLibgitRepository libgitRepositoryHandleAccessorPragmaSelector ] ]
[ :m | m pragmas anySatisfy: [ :p | p selector = IceLibgitRepository libgitRepositoryHandleAccessorPragmaSelector ] ]
]

{ #category : #accessing }
{ #category : 'accessing' }
IceShouldHandleLibgitErrors >> name [

^ 'Should manage errors when doing a libgit call'
Expand Down
25 changes: 13 additions & 12 deletions Iceberg-ArchitecturalRules/IceShouldHandleLibgitErrorsTest.class.st
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
Class {
#name : #IceShouldHandleLibgitErrorsTest,
#superclass : #TestCase,
#category : 'Iceberg-ArchitecturalRules'
#name : 'IceShouldHandleLibgitErrorsTest',
#superclass : 'TestCase',
#category : 'Iceberg-ArchitecturalRules',
#package : 'Iceberg-ArchitecturalRules'
}

{ #category : #rules }
{ #category : 'rules' }
IceShouldHandleLibgitErrorsTest class >> libgitRepositoryHandleAccessors [
self shouldBeImplemented.
]

{ #category : #tests }
{ #category : 'tests' }
IceShouldHandleLibgitErrorsTest >> check: aRule on: aMethod [

| lintRule |
Expand All @@ -18,7 +19,7 @@ IceShouldHandleLibgitErrorsTest >> check: aRule on: aMethod [
^ lintRule result smallLintCritics
]

{ #category : #tests }
{ #category : 'tests' }
IceShouldHandleLibgitErrorsTest >> testDefinedRepositoryAccessorDoesNotBreakRule [

| critiques |
Expand All @@ -27,7 +28,7 @@ IceShouldHandleLibgitErrorsTest >> testDefinedRepositoryAccessorDoesNotBreakRule
self assert: critiques isEmpty.
]

{ #category : #tests }
{ #category : 'tests' }
IceShouldHandleLibgitErrorsTest >> testDirectHandleAccessWithErrorChecking [

| critiques |
Expand All @@ -36,7 +37,7 @@ IceShouldHandleLibgitErrorsTest >> testDirectHandleAccessWithErrorChecking [
self assert: critiques isEmpty.
]

{ #category : #tests }
{ #category : 'tests' }
IceShouldHandleLibgitErrorsTest >> testDirectHandleAccessWithoutErrorChecking [

| critiques |
Expand All @@ -45,7 +46,7 @@ IceShouldHandleLibgitErrorsTest >> testDirectHandleAccessWithoutErrorChecking [
self assert: critiques notEmpty.
]

{ #category : #tests }
{ #category : 'tests' }
IceShouldHandleLibgitErrorsTest >> testHandleAccessThroughAllowedAccessorWithErrorChecking [

| critiques |
Expand All @@ -54,7 +55,7 @@ IceShouldHandleLibgitErrorsTest >> testHandleAccessThroughAllowedAccessorWithErr
self assert: critiques isEmpty.
]

{ #category : #tests }
{ #category : 'tests' }
IceShouldHandleLibgitErrorsTest >> testHandleAccessThroughAllowedAccessorWithoutErrorChecking [

| critiques |
Expand All @@ -63,7 +64,7 @@ IceShouldHandleLibgitErrorsTest >> testHandleAccessThroughAllowedAccessorWithout
self assert: critiques notEmpty.
]

{ #category : #tests }
{ #category : 'tests' }
IceShouldHandleLibgitErrorsTest >> testMethodNotBreakingRuleYieldsNoCritiques [

| critiques |
Expand All @@ -72,7 +73,7 @@ IceShouldHandleLibgitErrorsTest >> testMethodNotBreakingRuleYieldsNoCritiques [
self assert: critiques isEmpty.
]

{ #category : #tests }
{ #category : 'tests' }
IceShouldHandleLibgitErrorsTest >> testNonDefinedRepositoryAccessorBreaksRule [

| critiques |
Expand Down
2 changes: 1 addition & 1 deletion Iceberg-ArchitecturalRules/package.st
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Package { #name : #'Iceberg-ArchitecturalRules' }
Package { #name : 'Iceberg-ArchitecturalRules' }
12 changes: 7 additions & 5 deletions Iceberg-Libgit/IceBranchNotFound.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,22 @@
A branch was not found.
"
Class {
#name : #IceBranchNotFound,
#superclass : #IceError,
#name : 'IceBranchNotFound',
#superclass : 'IceError',
#instVars : [
'branchName'
],
#category : #'Iceberg-Libgit-Exceptions'
#category : 'Iceberg-Libgit-Exceptions',
#package : 'Iceberg-Libgit',
#tag : 'Exceptions'
}

{ #category : #accessing }
{ #category : 'accessing' }
IceBranchNotFound >> branchName [
^ branchName
]

{ #category : #accessing }
{ #category : 'accessing' }
IceBranchNotFound >> branchName: aString [
branchName := aString
]
Loading

0 comments on commit e875f30

Please sign in to comment.