Repository navigation
Fix: Selectively undeploying classes within a package - #835
Conversation
|
Was hoping I was going to be able to get away with just swapping the order of those if-statements but that is not the case. Worked for my loading package case but not install. |
|
Looks good to me! I know there was talk about unit tests so I'll check back for those at a later time! |
isc-eneil
left a comment
There was a problem hiding this comment.
@isc-jlechtne Left a couple of comments. Logic looks good to me!
isc-kiyer
left a comment
There was a problem hiding this comment.
@isc-jlechtne left a few comments. Also, for the tests, include some other resource types as well to show there is no adverse effect on them. Also, this ordering should also be applied more generally to all lifecycle phases (not just Reload) and in ExecutePhases or else the processing sequence is different for just reload.
| Set tResource = ..Module.Resources.GetNext(.tKey) | ||
| Quit:tKey="" | ||
| If $IsObject(tResource.Processor) { | ||
| Set depth = $LENGTH(tResource.Name, ".") |
There was a problem hiding this comment.
I forget where we had this discussion (over call or in a teams chat) but we should only process Document resources this way since other types of resources may depend on the ordering (although the ideally shouldn't but we want to keep backwards compatibility). So should check if the Processor class extends %IPM.ResourceProcessor.Default.Document and only if so, process it in this way. Otherwise, store resources in a separate array which is sequential
isc-kiyer
left a comment
There was a problem hiding this comment.
@isc-jlechtne few small comments and a question. To get this done and merged, I recommend creating a separate issue and PR for generalizing this lifecycle processing order
…ssary setting if empty string
isc-eneil
left a comment
There was a problem hiding this comment.
@isc-jlechtne Looks good! I don't think this should stop the merge, but there's a little difference in style (your changes all use lowercase ObjectScript, but the IPM codebase capitalizes commands).
Fixes #823
- This stops us from reaching the "If ..ResourceReference.Deploy" code block, where the deployed files are loaded in.
- Since at least one class isn't deployed, the class directory exists so stops execution. Issue is there are other resources in the
package that are deployed that we didn't handle
Fix:
- Loading a non-deployed resource should override anything that was one with deployed resources