Compile breaks with async-graphql v8.0.0-rc.1
bug
**Describe the bug**
<!--
Please describe the error and provide error logs as appropriate.
If something is confusing or unclear, please describe what you would have expected to happen
Otherwise, if you need help debugging a broken build configuration, consider
opening a discussion: https://github.com/ipetkov/crane/discussions
-->
This has to do with the symlink strategy for the vendored files. See, the askama macro expansion attempts to fetch something from its "canonical" path and produces this path, which looks fine!
```
/nix/store/xsslyz1min98f6vybfdgpmkzks0n2q4d-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/async-graphql-8.0.0-rc.1/src/http/../../../../../six525kx1s0sb6299l3d06j3nj59kidl-cargo-package-async-graphql-8.0.0-rc.1/templates/graphiql_source.jinja
```
..but if you `realpath` it, it fails with "no such file or directory" which seems weird! Because `/nix/store/six525kx1s0sb6299l3d06j3nj59kidl-cargo-package-async-graphql-8.0.0-rc.1/templates/graphiql_source.jinja` does indeed exist!
But then for a sanity check I went ahead and realpath'd just `/nix/store/xsslyz1min98f6vybfdgpmkzks0n2q4d-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/async-graphql-8.0.0-rc.1/src/http/../../../../../` and actually got `/` as the result which seems wrong.
But if I change in the directory `/nix/store/xsslyz1min98f6vybfdgpmkzks0n2q4d-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/async-graphql-8.0.0-rc.1/src/http` and run `realpath $(pwd)` it resolves to `/nix/store/six525kx1s0sb6299l3d06j3nj59kidl-cargo-package-async-graphql-8.0.0-rc.1/src/http` and suddenly things become clearer.
The `../../../../../` works off of the real path, not the symlinked path which then transports it up to the root directory.
Well, I have no idea how this would be fixed but this is unfortunately a thing and is also reproducible if you just change into the symlinked directory and use `bat` to try to list any directory that bash actually autocompletes.
**Reproduction**
<!--
Please provide a(n ideally minimal,) fully self-contained flake that
reproduces the issue, and specify which output needs to be built that shows
the error.
A partial snippet is not enough to fully investigate potential issues.
-->
[can add upon request]
1 条评论