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

Link’s Expunge completes the path when it shouldn’t #619

Closed
aplteam opened this issue Jan 7, 2024 · 0 comments
Closed

Link’s Expunge completes the path when it shouldn’t #619

aplteam opened this issue Jan 7, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@aplteam
Copy link
Contributor

aplteam commented Jan 7, 2024

Even when an object is specified by a full path does LINK attempt to complete the path.

That means that this:

      ⎕←⎕THIS
#.TEMP
      ⎕SE.Link.Expunge '#.Foo.Boo'

leads on line [9] to this:

      container
#.TEMP

That does not hurt because

#.TEMP.⎕EX '#.Foo.Boo'

would work as intended, but when Expunge is called from an instance of a class things are different, because this statement from line [15]:

(ns name)←container U.SplitNs i⊃names

assigns in my case #.Tester2.TestCases.[Tester2].#.TEMP to ns, and that leads to a crash on line [16]:

ns←⍎ns ⍝ resolve e.g. #.linkdemo.##

⎕SE.Link.U.SplitNs should ignore the left argument in case the right argument is fully qualified anyway.

This revised version of the fn would fix the problem:

SplitNs←{(~(1⍴⍵)∊'#⎕')∧0≠⎕NC'⍺':∇(⍕⍺),'.',⍵ ⋄ t←1+d←-'.'⍳⍨⌽⍵ ⋄ (d↓⍵)(t↑⍵)}

Desktop (please complete the following information):

]tooLS.Version
 Dyalog  19.0.48436 64-bit Unicode, BuildID 246567e8            
 OS      Windows 10 or Windows Server 2016 (10.0.19045) 64-bit  
 Link    4.0.12                                                 
 SALT    2.915                                                  
 UCMD    2.6                                                    
 .NET    .NET Framework 4.8.9181.0                              
 WS      19.0                                                   
 Tatin   0.103.1                                                
 Cider   0.38.0                                                 
@aplteam aplteam added the bug Something isn't working label Jan 7, 2024
@abrudz abrudz closed this as completed in 02f425a Feb 28, 2024
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

No branches or pull requests

1 participant