Skip to content

Commit

Permalink
Merge pull request #112 from jecisc/do-not-rely-on-classtraitdefinition
Browse files Browse the repository at this point in the history
Remove the usage of MCClassTraitDefinition
  • Loading branch information
MarcusDenker authored Sep 26, 2023
2 parents a807a52 + 6e1c8ec commit 874b329
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 48 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/tonel.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
name: Tonel-dev

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
on: [ push, pull_request ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
private - factory
newTraitDefinitionFrom: anArray

| metadata traitDefs |
| metadata definition |
metadata := anArray sixth.
traitDefs := { (self basicNewTraitDefinitionFrom: anArray) }.

traitDefs first hasClassTraitComposition ifTrue: [
| definition |
definition := (MCClassTraitDefinition baseTraitName: (metadata at: #name))
classTraitComposition: (metadata at: #classTraits);
yourself.

self addPackageInfoTo: definition from: metadata.

traitDefs := traitDefs copyWith: definition ].

^ traitDefs
definition := (MCTraitDefinition named: (metadata at: #name))
comment: (anArray second ifNil: [ '' ]);
yourself.
metadata
at: #traits ifPresent: [ :composition | definition traitComposition: composition ];
at: #classTraits ifPresent: [ :composition | definition classTraitComposition: composition ];
at: #instVars ifPresent: [ :ivar | definition instVarNames: ivar ];
at: #classInstVars ifPresent: [ :classIVar | definition classInstVarNames: classIVar ].
self addPackageInfoTo: definition from: metadata.
^ definition
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ definitionOrders
MCOrganizationDefinition. 0.
MCMethodDefinition. 1.
MCClassDefinition. 2.
MCTraitDefinition. 2.
MCClassTraitDefinition. 3 }
MCTraitDefinition. 2}
7 changes: 1 addition & 6 deletions MonticelloTonel-Core.package/monticello.meta/categories.st
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
SystemOrganization addCategory: #'MonticelloTonel-Core'!
SystemOrganization addCategory: #'MonticelloTonel-Core-Base'!
SystemOrganization addCategory: #'MonticelloTonel-Core-Errors'!
SystemOrganization addCategory: #'MonticelloTonel-Core-Reading'!
SystemOrganization addCategory: #'MonticelloTonel-Core-Utilities'!
SystemOrganization addCategory: #'MonticelloTonel-Core-Writing'!
self packageOrganizer ensurePackage: #'MonticelloTonel-Core' withTags: #(#Base #Errors #Reading #Utilities #Writing)!

0 comments on commit 874b329

Please sign in to comment.