Skip to content

Linking error with certain path notations #5

@sagehane

Description

@sagehane

Issue:

Using zangle with directories with a trailing slash causes a linking error:

$ zangle ls a/
a/y.md: line: 1 col: 1 reason: missing_symbol context: y
error: LinkingFailed
/nix/store/jz6fyj4c0c67z7f4iwisj3aypwkq2flf-zig-0.11.0-dev.3348+3faf376b0/lib/std/array_list.zig:0:0: 0x2106d3 in main (zangle)
/home/plumeus/.cache/zig/p/1220cee43eb2a5f3204909b2457a431f2816e1bcceb2eb251d3613808a9a30e85d9f/tools/zangle.zig:0:0: 0x20f4c5 in main (zangle)

Expected behaviour:

The command should behave the same whether the trailing slash exists or not, as shown below:

$ zangle ls a
x.txt

$ zangle tangle a && cat $(zangle ls a)
Lorem ipsum

How to reproduce:

  1. Make a directory containing one file that depends on another file in the same directory (example provided below)
  2. Run zangle <command> <dir>/ where the command could be something like ls or graph

Files used for reproducing:

a/x.md:

```txt file: x.txt
[[a/y.md::y]]
```

a/y.md:

```whatever tag: y
Lorem ipsum
```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions