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

Linking error with certain path notations #5

Open
sagehane opened this issue Jun 3, 2023 · 1 comment
Open

Linking error with certain path notations #5

sagehane opened this issue Jun 3, 2023 · 1 comment

Comments

@sagehane
Copy link

sagehane commented Jun 3, 2023

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
```
@sagehane
Copy link
Author

sagehane commented Jun 3, 2023

Other ways to reproduce the issue:

# These are fine
$ zangle ls ./a/x.md a/y.md
$ zangle ls a/./x.md a/y.md
$ zangle ls a//x.md a/y.md

# These aren't
$ zangle ls a/x.md ./a/y.md
$ zangle ls a/x.md a/./y.md
$ zangle ls a/x.md a//y.md

@sagehane sagehane changed the title Linking error with directories with a trailing slash as args Linking error with certain path notations Jun 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant