ipm icon indicating copy to clipboard operation
ipm copied to clipboard

Case sensitivity for resource files causing installation error on Linux only

Open isc-shuliu opened this issue 1 year ago • 1 comments

Bug

@isc-tleavitt @isc-kiyer I recently noticed that certain packages (such as alwo-ompare) can only be installed successfully on Mac/Windows, but not on Linux/containers. I've also found the underlying reason https://github.com/intersystems/ipm/blob/64abbd3be43a5ae049c9e0c05922904a8e69a4a2/src/cls/IPM/ResourceProcessor/Default/Document.cls#L154

Cause

This line checks for the existence of a <IRIS-INSTANCE-ROOT>/mgr/.modules/USER/alwo-ompare/1.0.1/udl/ompare/Schedule.cls file in the case of alwo-ompare. Although this file exists, it ends with capital .CLS instead of .cls. This doesn't matter for Mac/Windows, but causes a problem for Linux.

Solution & Discussion

I wonder if it makes sense to force filename checking to be case-insensitive in IPM. There is a utility function ##class(%IPM.Utils.File).Exists() that does basically the same thing as ##class(%File).Exists() except that the former ignores casing for all platforms where as the latter is platform dependent.

I think it might be potentially good, or even necessary, for us to enforce case-insensitivity for package publishers. The reason is that when developer from a case-sensitive platform publish packages on IPM, it should be installable by users on all platforms. If there are two files whose paths only differ in casing, it will cause file overwriting (or otherwise unpredictable behavior).

Additionally, it's uncommon for people to have 2 case-differing but otherwise identical files. For windows/mac users, they can't even do it by default. For Linux users, when they distribute a folder containing such files using git, it will also trigger a warning when others run git clone on windows/mac.

isc-shuliu avatar Jul 29 '24 19:07 isc-shuliu

@isc-shuliu I agree we should allow for case insensitivity

isc-kiyer avatar Jul 30 '24 17:07 isc-kiyer

Fixed for v1 in #528 - closing.

isc-tleavitt avatar Aug 27 '24 15:08 isc-tleavitt