-
Notifications
You must be signed in to change notification settings - Fork 19
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
Some resource types require custom unconfigure code #616
Comments
Managed to write my first resource processor! AFAICS a custom resource processor can't be used to redefine a single phase of an existing resource processor (because how In the long term it probably would be a good idea to make redefinition of a single step easier. |
@janihur you're right that .GBL is a bit of an outlier. Not killing globals on uninstall by default is a feature, IMO. But it would be reasonable to have a flag in the Global resource processor to make it easy to do that. Two reasons we shouldn't kill globals on uninstall by default:
In resource processors it's common to override On.*Phase and call ##super() in cases other than the one phase of interest. |
Yes, I can see that now 🤦♂️
|
Looking at %IPM.ResourceProcessor.Default.Global there's code that lets you provide the global name, and if you do it'll be killed on uninstallation. The resource name just ends up being used as a path to the file. This needs to be documented. |
I'm not sure if this is a bug or just a normal IPM pattern (if it is a valid pattern then it should be described in the wiki I guess).
I noticed a global imported in manifest:
Is not automatically removed during
uninstall
unlike the package. However IMO the problem here is asymmetry (different resource types behave differently) is not optimal developer experience.The obvious (?) workaround is the module has to provide it's own cleanup/unconfigure code:
Further pondering:
<Resource>
do haveProcessorClass
attribute that seems a useful concept (i.e. resource processors). Unfortunately thanks to my subpar ObjectScript skills I don't have a clear picture how to write your own. The relevant classes in (0.7.x) seems to be:%ZPM.PackageManager.Developer.Processor.Abstract
FileCopy
The text was updated successfully, but these errors were encountered: