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

Broken class definitions combining traits and slots #7756

Closed
pavel-krivanek opened this issue Nov 17, 2020 · 7 comments · Fixed by #8683
Closed

Broken class definitions combining traits and slots #7756

pavel-krivanek opened this issue Nov 17, 2020 · 7 comments · Fixed by #8683
Assignees
Projects

Comments

@pavel-krivanek
Copy link
Collaborator

pavel-krivanek commented Nov 17, 2020

Describe the bug
It is not possible to accept class definitions that combine traits and slots

To Reproduce

  1. Install this trait:
Trait named: #TAPartPresenter
	 uses: {}
	 slots: { #aspectSymbol . #id . #builder . #ignoreUpdates . #model . #enablementHelp . #storedHelp }
	 package: 'APart Pharo'
  1. try to create this class:
SpAbstractWidgetPresenter << #APartStatusBarPresenter
	uses: { TAPartPresenter };
	slots: { #message => SpObservableSlot };
	package: 'APart Pharo'

It is silently ignored.

Version information:

  • Version: Pharo 9.0.0
    Build information: Pharo-9.0.0+build.847.sha.c4346ad4c0fb762dbe689e6d06945c939019c032 (64 Bit)
@Ducasse Ducasse self-assigned this Nov 22, 2020
@MarcusDenker
Copy link
Member

This is working now for me

@pavel-krivanek
Copy link
Collaborator Author

to reproduce this issue, the fluid class definition must not be enabled in the image

@Ducasse
Copy link
Member

Ducasse commented Jan 26, 2021

I will check I thought that I fixed it. Now I did not try not using fluid.
I cannot do magic :) yet.
Now I cannot understand calypso code and I cannot fix calypso.
I'm sorry but this is my limit.
So may be it will stay like this.

@pavel-krivanek
Copy link
Collaborator Author

are fluid definitions ready to be set as default?

@Ducasse
Copy link
Member

Ducasse commented Jan 27, 2021

Not totally.
We fixed a lot of rougth edges but changeSorter and other a still hardcoding and manipulating strings.
Now I always wanted to modify Calypso so that it is able to guess that we are editing a method or a class but I got always discouraged and right now I have barely no time for Pharo :(

@MarcusDenker MarcusDenker added this to To do in Traits Feb 24, 2021
@Ducasse
Copy link
Member

Ducasse commented Mar 1, 2021

I found a trick. I scan the class definition source and set the fluid class parser on.
And this solves the issue.

@Ducasse
Copy link
Member

Ducasse commented Mar 3, 2021

	| oldClass class newClassName defTokens keywdIx classCompiler |
 	"for now make it work!"
 	('*<<*' match: aString)
 		ifTrue: [ ClassDefinitionPrinter showFluidClassDefinition: true ].

Traits automation moved this from To do to Done Mar 6, 2021
Ducasse added a commit that referenced this issue Mar 6, 2021
Fixes: #7756 Broken class definitions combining traits and slots [new try]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Traits
  
Done
Development

Successfully merging a pull request may close this issue.

3 participants