Dyalog / link

Source code for Link – the built-in component that enables the use of text files as the primary storage mechanism for APL source code
https://dyalog.github.io/link
MIT License
19 stars 11 forks source link

Unhelpful error message masking TRANSLATION ERROR on Import #603

Closed mbaas2 closed 7 months ago

mbaas2 commented 9 months ago

There is a problem in the way Link deals with incompatible files:

      ⎕SE.Link.Import #'C:/Data/dyalog/User-Meetings/2023-10-15 Dyalog 23 Elsinore/TP1 - Testing APL Systems/src/coolStat.apln'

⎕SE.Link.Import: Source file defines "", rather than "coolStat"

      ⎕SE.Link.Import #'C:/Data/dyalog/User-Meetings/2023-10-15 Dyalog 23 Elsinore/TP1 - Testing APL Systems/src/coolStat.apln'
      ∧

but the real problem is that the source could not be imported - as SALT tells us:

      ⎕SE.SALT.Load'"C:/Data/dyalog/User-Meetings/2023-10-15 Dyalog 23 Elsinore/TP1 - Testing APL Systems/src/coolStat.apln" -target=#'

TRANSLATION ERROR: Unicode character ⎕UCS 169 not in ⎕AVU
GetUnicodeFile[28] r←'UTF-8'⎕UCS clean 3↓r
                            ∧

BTW, the problem is intentional - there's invalid Unicode in comments - but Link's response could be better ;)

Desktop (please complete the following information): Dyalog 19.0.47744 64-bit Unicode, BuildID e025e417
OS Windows 10 or Windows Server 2016 (10.0.22631) 64-bit
SALT 2.914
UCMD 2.6
.NET 4.0.30319.42000
WS 19.0
⎕se.Link.Version 4.0.11