Skip to content

Configuration generated with inconsistent and non-OS compliant line endings #727

@xelxebar

Description

@xelxebar

Overview

Running under Linux (and potentially Windows as well), when Link creates a .linkconfig file, MacOS line endings (⎕UCS 13) are used, which causes spurious interaction with other Linux tools, e.g.

$ cat ws/.linkconfig
} },watch: "dir",ID: "4.0.17"},

In fact, however, the final byte is `⎕UCS 10`.

Link does respects ⎕UCS 10 line endings just fine at read time, so it might be desirable to also use OS-specific line endings at generation as well.

Reproduction

      ]LINK.Create # nonexistent -watch=dir
Linked: # ← /home/x/devel/com.wilsonb.git/scratchpad/bmp/nonexistent [directory was created]

      ⎕UCS d←⎕NREAD('nonexistent/.linkconfig'⎕NTIE 0) 83 ¯1
{
  LinkVersion: { ID: "4.0.17"},

  Settings: {
    watch: "dir",
  },
}

      10 13⍳d
2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 1 2 0

Note also the trailing ⎕UCS 10 byte.

Version Information

      ]version
 Dyalog  19.0.50027 64-bit Unicode, BuildID 3dae0625
 OS      Linux 6.13.12 #1 SMP PREEMPT_DYNAMIC 1 x86_64
 Link    4.0.17
 SALT    2.915
 UCMD    2.6
 .NET    .NET 8.0.8
 WS      19.0
 Tatin   (unavailable)
 Cider   (unavailable)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions