I added a symlink to my repo that references anoth...
# general
r
I added a symlink to my repo that references another file in my repo and I'm now getting this warning.
Copy code
[WARN] Exceeded the maximum link depth while traversing links. Stopping traversal.
This seems weird to me because the symlink is just referencing a file, not a directory. Any engine authors have any idea why this warning is occurring?
😬 1
āœ… 1
b
Do you have any directory symlinks? Can you reproduce this is isolation on like a toy repo?
r
I think this is actually due a plugin rule based on the trace logs - working on pinpointing exactly where now.
So this error message is occurring directly after running a process where
output_directory=(".",)
- however, both the symlink and it's target should be in the output digest.
Okay so this is occurring when running the
DigestSubset -> Digest
rule on that output digest. However, the pathglob is for a single file and the symlink itself is also a file symlink so seems like a bug to me?
b
A reproduction repo would be helpful, if that's possible
r
I finally printed out the digest entries and discovered the issue is on my end 😬
It was not the symlink I thought that was causing the issue
b
Two questions: 1. @ripe-gigabyte-88964 would you be interested in contributing a change to improve the error message? For instance, at least including the symlink being read I imagine would make it easier to debug 2. Do we think this is something that can happen for non-plugin code?
r
1. Yeah! I've been wanting to learn rust beyond the rustlings course and this seems like a simple enough task. 2. Probably? In my case I had a symlink in directory
digest_root/subdir1/subdir2
referencing
../..
r
Getting this error when I try and build the engine locally
Copy code
= note: ld: library not found for -liconv
          clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
          

error: could not compile `ring` (build script) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: linking with `cc` failed: exit status: 1
Which I got around doing this https://stackoverflow.com/a/35144610
Copy code
= note: ld: framework not found DiskArbitration
          clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
          

   Compiling utf8parse v0.2.0
error: could not compile `sysinfo` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
new one
b
Hm, not sure about those specific errors. Have you seen https://www.pantsbuild.org/2.21/docs/contributions/development/setting-up-pants ? (although may not help with those particular problems)
r
Yeah I'm trying to bootstrap the engine using the nix shell. Gonna update my mac to the latest version and see if that helps.
f
Did you find a solution? I am hitting the same problem (following the guide linked above).
Copy code
brew install libiconv
and
Copy code
export LIBRARY_PATH=$LIBRARY_PATH:$(brew --prefix)/lib:$(brew --prefix)/opt/libiconv/lib
worked for me … but this should probably be added to the docs (note: I am also running in the nix-shell) also hitting this as the next issue:
Copy code
= note: ld: framework not found DiskArbitration
          clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
a
I ended up abandoning nix shell and was able to get it working normally. I think someone has refactored the nix-shell instructions in the time since then but not sure.
f
Hmm, I followed the current instructions and ran into the same issues as you.
a
Yeah I would try and set it up without nix then if possible.
f
yeah, might give it a try when I have time … hoping I get away with something like this (https://pantsbuild.slack.com/archives/C046T6T9U/p1720425139588459?thread_ts=1720391531.840279&cid=C046T6T9U) in the meantime for Python-only contributions
Okay, without nix worked well šŸ™‚