Skip to content

Regression: IPM 0.10.3+ no longer support naming Document resources as directories #1065

@isc-eneil

Description

@isc-eneil

The following used to work correctly (loading each file in the named directory) on IPM 0.9.0 but no longer does on 0.10.5:

<Resource Name="/rtn" ProcessorClass="Default.Routine" Deploy="true"></Resource>
<Resource Name="/inc" ProcessorClass="Default.Include" Deploy="true"></Resource>

The likely culprit is #849 . In %IPM.Storage.Module::GetOrderedResourceList(), the following logic exists:

            // Strip extension from resource name as that caused improper sorting (i.e. MyPackage.MyClass.CLS gets sorted before MyPackage.PKG)
            set tResourceName = $piece(tResource.Name,".",1,*-1)
            if ($get(documentResourceList(tResourceName)) = "") {
                set documentResourceList(tResourceName) = ##class(%ListOfObjects).%New()
            }
            do documentResourceList(tResourceName).Insert(tResource)
        }

It attempts to extract a file extension from resources whose ResourceProcessor class extends %IPM.ResourceProcessor.Default.Document and then errors with the following on those with names beginning with / (and therefore no file extension):

�ERROR #5002: ObjectScript error: <SUBSCRIPT>GetOrderedResourceList+9^%IPM.Storage.Module.1 *documentResourceList("")
--
ERROR #6315: Errors reporting importing XML subelement in file

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions