Skip to content

Commit

Permalink
Merge pull request #81 from moosetechnology/development
Browse files Browse the repository at this point in the history
Update master branch for v1.1.8 (Moose 11)
  • Loading branch information
ClotildeToullec authored Jul 2, 2024
2 parents bcadec8 + ee00fe1 commit 4dcceb3
Show file tree
Hide file tree
Showing 29 changed files with 1,150 additions and 1,311 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
smalltalk: [ Pharo64-10 ]
smalltalk: [ Pharo64-10, Pharo64-11 ]
name: ${{ matrix.smalltalk }}
steps:
- uses: actions/checkout@v2
Expand Down
3 changes: 2 additions & 1 deletion src/.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
#format : #tonel
#format : #tonel,
#version: #'1.0'
}
44 changes: 29 additions & 15 deletions src/BaselineOfFame/BaselineOfFame.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Class {
#category : #BaselineOfFame
}

{ #category : #baseline }
{ #category : #baselines }
BaselineOfFame >> baseline: spec [

<baseline>
Expand All @@ -21,19 +21,32 @@ BaselineOfFame >> baseline: spec [

"Packages"
spec
package: 'Fame-Core' with: [ spec requires: #( 'Hashtable' 'TreeQuery' 'Iterators' 'PharoBackwardCompatibility' ) ];
package: 'Fame-Core' with: [
spec requires:
#( 'TreeQuery' 'Iterators' 'PharoBackwardCompatibility' ) ];
package: 'Fame-Rules';
package: 'Fame-ImportExport' with: [ spec requires: #( 'Fame-Core' ) ];
package: 'Fame-ImportExport'
with: [ spec requires: #( 'Fame-Core' 'Hashtable' ) ];
package: 'Fame-Example';
package: 'Fame-Tests' with: [ spec requires: #( 'Fame-Core' 'Fame-ImportExport' 'Fame-Example' 'Mocketry' ) ];
package: 'Fame-Deprecated' with: [ spec requires: #( 'Fame-ImportExport' ) ].
package: 'Fame-Tests' with: [
spec requires:
#( 'Fame-Core' 'Fame-ImportExport' 'Fame-Example' 'Mocketry' ) ];
package: 'Fame-Deprecated'
with: [ spec requires: #( 'Fame-ImportExport' ) ].

spec for: #( #'pharo6.x' #'pharo7.x' #'pharo8.x' ) do: [ spec package: 'Fame-GT' with: [ spec requires: #( 'Fame-ImportExport' ) ] ].
spec for: (self pharoVersionsFrom: 9) do: [ spec package: 'Fame-Spec2' with: [ spec requires: #( 'Fame-Core' ) ] ].
spec for: #( #'pharo6.x' #'pharo7.x' #'pharo8.x' ) do: [
spec
package: 'Fame-GT'
with: [ spec requires: #( 'Fame-ImportExport' ) ] ].
spec for: (self pharoVersionsFrom: 9) do: [
spec
package: 'Fame-Spec2'
with: [ spec requires: #( 'Fame-Core' ) ] ].

"Groups"
spec
group: 'Core' with: #( 'Fame-Core' 'Fame-ImportExport' 'Fame-Rules' );
group: 'Core'
with: #( 'Fame-Core' 'Fame-ImportExport' 'Fame-Rules' );
group: 'Deprecated' with: #( 'Core' 'Fame-Deprecated' );
group: 'Tests' with: #( 'Fame-Tests' ) ]
]
Expand All @@ -49,19 +62,20 @@ BaselineOfFame >> hashtable: spec [

{ #category : #dependencies }
BaselineOfFame >> iterators: spec [
spec baseline: 'Iterators' with: [

spec baseline: 'Iterators' with: [
spec
repository: 'github://juliendelplanque/Iterators:v1.x.x/src';
loads: #('core' 'collections' 'shell-dsl' 'inspector-extensions') ]
loads: #( 'core' 'collections' 'shell-dsl' ) ]
]

{ #category : #dependencies }
BaselineOfFame >> mocketry: spec [
spec
baseline: 'Mocketry'
with: [ spec
loads: #('Core');
repository: 'github://dionisiydk/Mocketry:v6.0.x' ]

spec baseline: 'Mocketry' with: [
spec
loads: #( 'Core' );
repository: 'github://dionisiydk/Mocketry:v7.0.2' ]
]

{ #category : #dependencies }
Expand Down
17 changes: 16 additions & 1 deletion src/Fame-Core/FM3Property.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ Class {
'implementingSelector',
'isTarget',
'isSource',
'defaultValue'
'defaultValue',
'hasDefaultValueFromType'
],
#category : #'Fame-Core-Model'
}
Expand All @@ -87,6 +88,7 @@ FM3Property >> defaultValue [

{ #category : #private }
FM3Property >> defaultValue: aValue [

defaultValue := aValue
]

Expand Down Expand Up @@ -115,6 +117,19 @@ FM3Property >> hasDefaultValue [

]

{ #category : #private }
FM3Property >> hasDefaultValueFromType [

<FMProperty: #hasDefaultValueFromType type: #Boolean>
^ hasDefaultValueFromType
]

{ #category : #private }
FM3Property >> hasDefaultValueFromType: aBoolean [

hasDefaultValueFromType := aBoolean
]

{ #category : #testing }
FM3Property >> hasImplementingSelector [
^ self implementingSelector isNotNil
Expand Down
3 changes: 3 additions & 0 deletions src/Fame-Core/FMMetaModelBuilder.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,9 @@ FMMetaModelBuilder >> processCompiledMethod: aMethod [
typeDict at: prop put: (pragma argumentAt: 2).
mmClassDict at: prop put: method methodClass.
pragma selector = #FMProperty:type:defaultValue: ifTrue: [ prop defaultValue: (pragma argumentAt: 3) ].
(pragma selector = #FMProperty:type:
and: [ method pragmas anySatisfy: [ :p | p selector = #withDefaultValueFromType ] ])
ifTrue: [ prop hasDefaultValueFromType: true ].
(pragma selector = #MSEProperty:type:opposite: or: [ pragma selector = #FMProperty:type:opposite: ]) ifTrue: [
oppositeDict at: prop put: (pragma argumentAt: 3) ].
self processInfosFrom: method for: prop.
Expand Down
5 changes: 3 additions & 2 deletions src/Fame-Core/FMModel.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ Class {

{ #category : #'instance creation' }
FMModel class >> withMetamodel: aMetamodel [

^ self new
metamodel: aMetamodel;
yourself
metamodel: aMetamodel;
yourself
]

{ #category : #visiting }
Expand Down
42 changes: 17 additions & 25 deletions src/Fame-Core/FMMultiMultivalueLink.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -25,58 +25,50 @@ Class {
}

{ #category : #adding }
FMMultiMultivalueLink >> add: anElement [
(anElement perform: opposite) unsafeAdd: owner.
(values includes: anElement) ifFalse: [ values add: anElement ].
^ anElement
]
FMMultiMultivalueLink >> addOpposite: anElement [

{ #category : #removing }
FMMultiMultivalueLink >> remove: anElement ifAbsent: exceptionBlock [

values remove: anElement ifAbsent: [ ^exceptionBlock value ].
(anElement perform: opposite) unsafeRemove: owner.
^anElement
(anElement perform: opposite) unsafeAdd: owner
]

{ #category : #removing }
FMMultiMultivalueLink >> removeAll [
values reversed
do: [ :anElement | (anElement perform: opposite) remove: owner ]
FMMultiMultivalueLink >> removeOpposite: anElement [

(anElement perform: opposite) unsafeRemove: owner
]

{ #category : #'private - adding' }
FMMultiMultivalueLink >> uncheckAdd: anElement [
FMMultiMultivalueLink >> uncheckAdd: anElement [

(anElement perform: opposite) uncheckUnsafeAdd: owner.
values add: anElement.
self uncheckUnsafeAdd: anElement.
^ anElement
]

{ #category : #'private - adding' }
FMMultiMultivalueLink >> uncheckAddAll: aCollection [
FMMultiMultivalueLink >> uncheckAddAll: aCollection [
"Include all the elements of aCollection as the receiver's elements. Answer
aCollection. Actually, any object responding to #do: can be used as argument."

aCollection do: [ :each | self uncheckAdd: each ].
^ aCollection
]

{ #category : #'private - adding' }
FMMultiMultivalueLink >> uncheckUnsafeAdd: element [
values add: element
]

{ #category : #adding }
FMMultiMultivalueLink >> value: aCollection [

^ self
removeAll: values copy;
uncheckAddAll: aCollection asOrderedCollection removeDuplicates
removeAll;
"We want unique elements and to keep the order, but `removeDuplicates` is really slow."
uncheckAddAll: (aCollection
collect: [ :element | element -> nil ]
as: OrderedDictionary) keys
]

{ #category : #private }
FMMultiMultivalueLink >> with: element opposite: oppositeSelector [

self assert: oppositeSelector numArgs = 0.
values := OrderedCollection new.
self setContents: #( ).
owner := element.
opposite := oppositeSelector
]
Loading

0 comments on commit 4dcceb3

Please sign in to comment.