intersystems / ipm

InterSystems ObjectScript Package Manager
MIT License
27 stars 19 forks source link

zpm verify command fails with <CLASS DOES NOT EXIST> #428

Closed isc-pbarton closed 1 week ago

isc-pbarton commented 1 year ago

If I run:

zpm "verify git-source-control"

It fails with an error:

[git-source-control]    Verify FAILURE
ERROR! ObjectScript error: <CLASS DOES NOT EXIST>LoadNewModule+28^%ZPM.PackageManager.Developer.Utils.1 *%ZPM.PackageManager.Core.JournalManager

That class *%ZPM.PackageManager.Core.JournalManager is in the IPM repository, but it is not included in the installer for the latest version of IPM.

isc-tleavitt commented 4 months ago

There are even bigger issues with verify in the v1 branch, will address this and those there.

isc-tleavitt commented 3 months ago

Root cause (or at least a strong contributing factor) is that the class has the [ Hidden ] keyword. The value in this is negligible, so I'm going to remove it.

isc-tleavitt commented 3 months ago

This is already resolved in the v1 branch (as evidenced by JournalManager's inclusion in the v0.9.0 beta releases but not v0.7.1). %IPM.Storage.ResourceReference:GetChildren temporarily sets the flag to include hidden files in StudioOpenDialog. I wondered why we were using StudioOpenDialog rather than %Dictionary.ClassDefinition - it looks like this goes back to https://github.com/intersystems/ipm/commit/3fb033e02238083449bd6c7e31626ef3b9133b9f which is presumably intentionally missing from IPM. This difference might explain some of our lingering package installation errors between v1 and master (tracked in #475) - will need to investigate that.

@isc-bzhang @isc-kiyer do you have any recollection of looking at this during your merge process?

isc-kiyer commented 3 months ago

@isc-tleavitt Yes I recall fixing StudioOpenDialog since it was missing classes in HS (such as hidden classes). We had to set this global: ^%SYS("Studio","ShowHidden") before the search and reset it to its prior value after the search. Regarding using StudioOpenDialog instead of %Dictionary.ClassDefinition, I believe this is so that the "PKG" resource type picks up multiple document types rather than just classes - so include files, routines etc. I think that is useful behavior to have but if we can achieve it differently, am open to that.

cc @isc-bzhang @isc-eneil

isc-tleavitt commented 3 months ago

@isc-kiyer it seems that this part of the multi-document type support has been removed in v1: https://github.com/intersystems/ipm/blob/v1/src/cls/IPM/Storage/ResourceReference.cls#L129

See https://github.com/intersystems/ipm/commit/5c8f4e92106831054d0b7233cf6b134239ed204c - @isc-bzhang is there any supporting Jira/background for this?

isc-tleavitt commented 3 months ago

The original issue will be resolved with the release of v0.9.0 - split out the thing we found with multiple types as a separate issue.

isc-tleavitt commented 1 week ago

Closing issues fixed in v1 branch for cleaner bookkeeping.