Dyalog / Dyalog/link

fastLoad options signals an error although creating the object

Open
#711 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
APL
Stars
26
Forks
11
Avg merge
1d 18h
Merged PRs (30d)
1

Description

**Describe the bug**
Link.Create with the fastLoad option signals a Value Error when only a file is given as a right argument and the file content has a name clash

**To Reproduce**
Steps to reproduce the behaviour:
File XmyClass.dyalog:
:Class myClass
:Field Public START←1
:Field Public END←2
:EndClass

Try to link this file in the Dyalog session:

opts←⎕NS''
opts.fastLoad←1
⎕SE.Link.Create 'E:\Temp\XmyClass.dyalog'
⎕SE.Link.Create: Source file defines "myClass", rather than "XmyClass"
⎕SE.Link.Create'E:\Temp\XmyClass.dyalog'

⎕DMX.(EN ENX EM Message)
┌───┬─┬──────────────────────────────────────────┬┐
│501│0│⎕SE.Link.Create: Source file defines "myClass", rather than "XmyClass"││
└───┴─┴──────────────────────────────────────────┴┘
⎕nl ¯9
┌────┐
│opts│
└────┘
opts ⎕SE.Link.Create 'E:\Temp\XmyClass.dyalog'
VALUE ERROR: Undefined name: XmyClass
opts ⎕SE.Link.Create'E:\Temp\XmyClass.dyalog'

⎕DMX.(EN ENX EM Message)
┌─┬─┬───────────┬─────────────┐
│6│0│VALUE ERROR│Undefined name: XmyClass│
└─┴─┴───────────┴─────────────┘
⎕nl ¯9
┌───────┬─┐
│myClass│opts│
└───────┴─┘
Link Warning: ⎕SE.Link.Notify: changed E:/Temp/XmyClass.dyalog: path not in a linked directory
Link Warning: ⎕SE.Link.Notify: changed E:/Temp/XmyClass.dyalog: path not in a linked directory

**Expected behaviour**
With the fastLoad option, I wouldn´t expect an error. Mayby Link can give a notify message or a warning.
Link.Status should reflect the correct information, that the file is linked to the namespace/class.

**Desktop (please complete the following information):**
Dyalog 19.0.50074 64-bit Unicode, BuildID 09ca43b9
OS Windows 11 (10.0.26100) 64-bit
Link 4.0.17

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.