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

Ability to auto-generate Subapplication #loaded, #failedRemove, and #removed methods with pharo compatible mode #75

Closed
marianopeck opened this issue Apr 20, 2021 · 2 comments
Milestone

Comments

@marianopeck
Copy link
Collaborator

Whenever we have specified "pharo compatible mode/strategy", we should allow to autogenerate those 3 methods as the old MonticelloImporter did.

Each generated subapplication should include class-side #loaded, #failedRemove, and #removed methods. These methods are identical for all generated Subapplications.

loaded
 "Send #initializeOnLoad to every class defined in this subapplication that implements it."

 defined do: [ :aClass |
  (aClass class includesSelector: #initializeOnLoad) ifTrue: [ aClass initializeOnLoad ] ]
failedRemove

 self loaded
removing
 "Send #unload to every class defined in this subapplication that implements it."

 defined do: [ :aClass |
  (aClass class includesSelector: #unload) ifTrue: [ aClass unload ] ]

The #loaded method depends on the special handling of class-side #initialize methods in the original (Pharo) Seaside classes. The Monticello Importer replaces #initialize methods with class-side #initializeOnLoad methods having identical content.

Generally the only sender of #initializeOnLoad in Grease and Seaside is the #loaded method.

@marianopeck
Copy link
Collaborator Author

marianopeck commented Apr 20, 2021

For more details see #76

@eMaringolo eMaringolo added this to the 1.3 milestone Jun 1, 2021
eMaringolo added a commit that referenced this issue Jun 23, 2021
@eMaringolo
Copy link
Collaborator

This was solved in d90ac1d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants