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

Update master branch for v1.1.8 (Moose 11) #81

Merged
merged 40 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
11620b5
Add #hasDefaultValueFromType to FM3Property.
ClotildeToullec Mar 31, 2023
380db75
Fix test
ClotildeToullec Mar 31, 2023
be21f31
Fix test again
ClotildeToullec Mar 31, 2023
e9a5713
Merge pull request #55 from moosetechnology/hasDefaultValueFromType
ClotildeToullec Mar 31, 2023
82ec276
Fix #56
Gabriel-Darbord May 16, 2023
261cffd
Remove references to Transcript
ClotildeToullec Sep 11, 2023
7fa5952
Merge pull request #58 from moosetechnology/small-change
jecisc Sep 11, 2023
9c47d49
Fix baseline + remove old GT package
ClotildeToullec Sep 13, 2023
14d4e55
Autofix
ClotildeToullec Sep 13, 2023
1bff09e
Autofix
ClotildeToullec Sep 13, 2023
29bc726
Use latest Mocketry release.
ClotildeToullec Sep 14, 2023
579fb35
Do not load GTInspector package of Iterators
ClotildeToullec Sep 14, 2023
01f2075
Merge pull request #59 from moosetechnology/mocketry-version
ClotildeToullec Sep 14, 2023
73e7c4a
Merge pull request #60 from moosetechnology/small-dependencies-fixes
jecisc Sep 14, 2023
6a7a593
Use 'unavailable' instead of the MooseUnavailableMetric class, to bre…
ClotildeToullec Sep 14, 2023
181c2e4
Merge pull request #62 from moosetechnology/mocketry-version
ClotildeToullec Sep 14, 2023
0065067
Run CI on P11 (#61)
ClotildeToullec Sep 14, 2023
e945c77
creating accessors #fourth to #ninth in FMMultiValuelink
Dec 5, 2023
b3c3017
creating accessors #fourth to #ninth in FMSlotMultiValueLink
Dec 5, 2023
47c17ac
Merge pull request #64 from moosetechnology/fmMultiValue-fourth-to-ni…
NicolasAnquetil Dec 5, 2023
3370940
FMMultivalueLink inherits from SequenceableCollection instead of Coll…
Gabriel-Darbord Dec 14, 2023
48515e0
Merge pull request #65 from moosetechnology/sequenceable-links
jecisc Dec 14, 2023
5ed3143
Revert "FMMultivalueLink inherits from SequenceableCollection"
jecisc Dec 18, 2023
02fecae
Fix class generation
jecisc Dec 19, 2023
48a7d50
Merge pull request #68 from moosetechnology/class-generation
jecisc Dec 19, 2023
8df51fe
Close #69: FMMultivalueLink inherits from OrderedCollection
Gabriel-Darbord Dec 22, 2023
ad77571
Merge pull request #70 from moosetechnology/69-Make-FMMultivalueLink-…
Gabriel-Darbord Dec 22, 2023
267f228
Close #72: FMSlotMultivalueLink inherits from OrderedCollection
Gabriel-Darbord Jan 29, 2024
8f04d63
Merge pull request #73 from moosetechnology/72-Make-FMSlotMultivalueL…
Gabriel-Darbord Jan 29, 2024
01c542b
Update tonel version
jecisc Jan 31, 2024
d1d1a4d
Merge pull request #74 from moosetechnology/set-tonel-version
jecisc Jan 31, 2024
f818ea3
Try to save the number parser instead of creating one at each number …
jecisc Apr 3, 2024
cb991fb
Another reuse of the number parser
jecisc Apr 4, 2024
311c421
Merge pull request #75 from moosetechnology/numberParser
jecisc Apr 4, 2024
1d7ba56
Refactoring in FMModel export.
ClotildeToullec May 14, 2024
62b9248
Merge pull request #76 from moosetechnology/export-refactoring
ClotildeToullec May 14, 2024
0a1717c
FMMSEParserTest refactoring.
ClotildeToullec May 21, 2024
a58a2a2
Merge pull request #77 from moosetechnology/export-refactoring
ClotildeToullec May 21, 2024
5e2cc9c
Fix JSON Syntax error when exporting an entity with no properties.
ClotildeToullec Jun 24, 2024
ee00fe1
Merge pull request #80 from moosetechnology/79-JSON-error-in-model-ex…
ClotildeToullec Jun 24, 2024
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 .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
Loading