Skip to content

No folders fix #138

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

Merged
merged 6 commits into from
Mar 22, 2022
Merged

No folders fix #138

merged 6 commits into from
Mar 22, 2022

Conversation

isc-svelury
Copy link
Contributor

@isc-svelury isc-svelury commented Mar 14, 2022

  1. Modify the settings page to allow the user to set a path even when the NoFolders toggle is off, and store mappings accordingly.
  2. Change the way the mappings are processed to account for the changes in 1
  3. Fix the subscript error.

This PR closes #130 and #145

@isc-svelury isc-svelury added the bug Something isn't working label Mar 14, 2022
@@ -1556,7 +1550,7 @@ ClassMethod NameToInternalName(Name, IgnorePercent = 1, IgnoreNonexistent = 1) A
}
}
set fileExt=$zconvert($piece(nam,".",$length(nam,".")),"L")
if (InternalName="")&&('$data(ext)=0)&&('$listfind($listbuild("xml","rtn"),fileExt)) {
if (InternalName="")&&($data(ext)=0)&&('$listfind($listbuild("xml","rtn"),fileExt)) {
//no match found yet, and this is in a subdir for a specific document type (ext), however it is not in a typical export format
//so treat it as a non-mapped file
kill ext
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If $data(ext)=0 then killing it is a no-op.


Method %OnClose() As %Status
{
merge @##class(SourceControl.Git.Utils).MappingsNode() = ..Mappings
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should kill the mappings node as well (first). As it stands it'll leave the nspace/hl7/ in place.

// % class that exists but we ignore % classes
do $$$AssertEquals(##class(Utils).NameToInternalName("cls\%Studio\Extension\Base.cls"),"")
// % class that exists and we don't ignore % classes
do $$$AssertEquals(##class(Utils).NameToInternalName("cls\%Studio\Extension\Base.cls", 0),"%Studio.Extension.Base.CLS")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In all of these cases, we shouldn't have % in the folder name. (I believe this is illegal in Windows which is why we generally don't do it.) But it should still work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. I forgot about that. I'll change the tests.

@isc-tleavitt
Copy link
Collaborator

@isc-svelury I think this is still in progress / pending changes - can you confirm?

@isc-svelury
Copy link
Contributor Author

It is in progress. The TestAbstractDocumentClassNames() method needs to be changed to use .dfi files instead of .hl7.

@isc-svelury isc-svelury linked an issue Mar 22, 2022 that may be closed by this pull request
@isc-tleavitt isc-tleavitt merged commit 116de52 into main Mar 22, 2022
@isc-tleavitt isc-tleavitt deleted the no-folders-fix branch March 22, 2022 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NoFolders toggles does not work as expected. Output of Schema with periods (dots) in name breaks SC Ad
2 participants