Skip to content

Commit

Permalink
Fix: there is not always an MCClassTraitDefinition in a package for e…
Browse files Browse the repository at this point in the history
…very trait

For example, my FileSystem-Git package only has a MCClassTraitDefinition
for TGitActiveUnitOfWorkDuringTest, but not for TGitVisitor. A difference
is that TGitActiveUnitOfWorkDuringTest itself uses another trait, and that
also affects the class trait composition of TGitActiveUnitOfWorkDuringTest.
TGitVisitor does not use another thread, and its class trait composition is
empty. Apparently that is not worth a class trait definition...
  • Loading branch information
j4yk committed Aug 8, 2022
1 parent 20ecbad commit d947137
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ writeDiff: aSquotArtifactDiff
[classTrait := classTraits at: each className.
(newDefinitions includes: classTrait) ifFalse: [missingClassTraits add: classTrait]]].
(missingClassifiers select: [:each | each isTraitDefinition])
do: [:each | | classTrait | classTrait := classTraits at: each className.
(newDefinitions includes: classTrait) ifFalse: [missingClassTraits add: classTrait]].
do: [:each | | classTrait | classTrait := classTraits at: each className ifAbsent: [].
(classTrait notNil and: [(newDefinitions includes: classTrait) not])
ifTrue: [missingClassTraits add: classTrait]].
cypressWriter writeDefinitions: newDefinitions, missingClassifiers, missingClassTraits.
"Fix up methodProperties.json files (they now only include the methods that were newly written)."
allMethods := (newDefinitions select: [:each | each isMethodDefinition]) collect: [:each | each description -> each] as: Dictionary.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"write:" : "jr 5/9/2017 18:24",
"writeClass:" : "jr 9/3/2020 22:48",
"writeDefinitions:" : "jr 1/29/2017 21:08",
"writeDiff:" : "jr 8/7/2022 23:33",
"writeDiff:" : "jr 8/8/2022 19:29",
"writeMCSnapshot:forPackageNamed:from:" : "jr 3/16/2019 23:35",
"writePackage:" : "jr 9/3/2020 22:47",
"writePropertiesIfExists" : "jr 9/3/2020 22:47" } }

0 comments on commit d947137

Please sign in to comment.