Skip to content
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

NameToInternalName on LUT (for example) could convert _ to % #588

Closed
isc-tleavitt opened this issue Oct 28, 2024 · 2 comments · Fixed by #636
Closed

NameToInternalName on LUT (for example) could convert _ to % #588

isc-tleavitt opened this issue Oct 28, 2024 · 2 comments · Fixed by #636
Assignees
Labels
bug Something isn't working customer Based on customer feedback (as opposed to something identified by developers)

Comments

@isc-tleavitt
Copy link
Collaborator

isc-tleavitt commented Oct 28, 2024

SourceControl.Git.Utils:NameToInternalName could potentially switch _ to % on import of a lookup table (.LUT) document:

        if (InternalName="") {
            //take our best guess based on the document extension mapped to that subdirectory
            set nam=$piece(nam,".",1,*-1)
            set nam=$replace(nam, ..PercentClassReplace(), "%")
            set nam=$translate(nam,"/",".")
            set InternalName=nam_"."_fileExt
            if (fileExt="cls") {
                // special handling for possible collissions between % and non-% classes of the same name
                set alternateInternalName="%"_InternalName
                set primaryExists=##class(%RoutineMgr).Exists(InternalName), alternateExists=##class(%RoutineMgr).Exists(alternateInternalName)
                if ('primaryExists)&&(alternateExists) { set InternalName=alternateInternalName }	// it must have been a %-class as one by that name exists
                if (primaryExists)&&(alternateExists) { quit "" }	//indeterminate as the class exists in % and non-% form in the DB
            }
        }

I haven't reproduced this but it seems like the only path to explain what's happening. PercentClassReplace should only apply to classes/routines/include files, not user types and definitely not automatically reverse-translating.

@isc-tleavitt isc-tleavitt added bug Something isn't working customer Based on customer feedback (as opposed to something identified by developers) labels Oct 28, 2024
@isc-tleavitt isc-tleavitt added this to the Q3/Q4 2024 Targets milestone Oct 28, 2024
@isc-tleavitt isc-tleavitt changed the title Internal name of LUT converts _ to % NameToInternalName on LUT (for example) could convert _ to % Oct 28, 2024
@isc-tleavitt
Copy link
Collaborator Author

Attempted to reproduce this but couldn't. Will need to get more details from the reporter.

@isc-etamarch
Copy link
Collaborator

@isc-tleavitt Should I address this or wait for more details from reporter?

@isc-etamarch isc-etamarch self-assigned this Nov 11, 2024
@isc-etamarch isc-etamarch linked a pull request Nov 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working customer Based on customer feedback (as opposed to something identified by developers)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants