solidiquis/erdtree

Symlinks sometimes not shown

Closed this issue · 4 comments

For some of my directories, erd does not list symlinks.

Here is the output of /bin/ls -l:

$ /bin/ls -l
total 1312
-rw-r--r--  1 immanuel users    1961 May 30 16:21 API.md
drwxr-xr-x  8 immanuel users    4096 May 30 16:21 benchmark
-rw-r-----  1 immanuel users   65536 Jun 26 11:36 benchmark.hyper
drwxr-xr-x  4 immanuel users    4096 Jun 26 11:18 build
-rw-r--r--  1 immanuel users   18351 Jun 27 08:20 CMakeLists.txt
lrwxrwxrwx  1 immanuel users      40 May 30 15:30 compile_commands.json -> build/debug_shared/compile_commands.json
-rw-r--r--  1 immanuel users     812 May 30 16:21 CONTRIBUTORS.md
-rwxr-xr-x  1 immanuel users    2274 May 30 16:21 coverage.sh
drwxr-xr-x  2 immanuel users    4096 Jun 27 08:20 doc
drwxr-xr-x  2 immanuel users    4096 May 30 16:21 doxy
-rw-r--r--  1 immanuel users   13847 May 30 16:21 Doxyfile
-rw-r--r--  1 immanuel users   13157 May 30 16:21 Doxyfile-api
-rwxr-xr-x  1 immanuel users    2607 May 30 16:21 eval-information-value.sh
-rwxr-xr-x  1 immanuel users    8652 Jun 27 08:21 eval-planners.sh
-rwxr-xr-x  1 immanuel users    3099 May 30 16:21 eval-states-generated.sh
-rwxr-xr-x  1 immanuel users    6483 May 30 16:21 eval-thinned_clique.sh
drwxr-xr-x  2 immanuel users    4096 May 30 16:21 hooks
-rw-rw----  1 immanuel users 1006932 Jun 26 11:36 hyperd.log
drwxr-xr-x  3 immanuel users    4096 May 30 16:21 include
-rw-r--r--  1 immanuel users   34523 May 30 16:21 LICENSE
drwxr-xr-x  2 immanuel users    4096 May 30 16:21 patches
-rw-r--r--  1 immanuel users     483 Jun 27 08:21 Pipfile
-rw-r--r--  1 immanuel users   22302 Jun 27 08:21 Pipfile.lock
-rw-r--r--  1 immanuel users    2749 Jun 26 09:28 planner-configs.sh
-rwxr-xr-x  1 immanuel users   12664 May 30 16:21 querygen.py
-rw-r--r--  1 immanuel users   21395 Jun 26 09:28 README.md
drwxr-xr-x  2 immanuel users    4096 May 30 16:21 resources
-rwxr-xr-x  1 immanuel users    2051 May 30 16:21 run.sh
-rw-r--r--  1 immanuel users    2920 May 30 16:21 semantics.md
drwxr-xr-x 11 immanuel users    4096 Jun 26 09:28 src
drwxr-xr-x  5 immanuel users    4096 May 30 16:21 test
drwxr-xr-x  8 immanuel users    4096 Jun 26 11:24 third-party
-rw-r--r--  1 immanuel users    2789 May 30 16:21 TODO.md
drwxr-xr-x 10 immanuel users    4096 May 30 16:21 unittest
drwxr-xr-x  2 immanuel users    4096 May 30 16:21 utils

Now here's the output of /bin/erd --level 1:

$ /bin/erd --level 1
   4096 B ┌─ TODO.md
   4096 B ├─ patches
   4096 B ├─ coverage.sh
   4096 B ├─ eval-states-generated.sh
   4096 B ├─ Pipfile
   4096 B ├─ semantics.md
   4096 B ├─ eval-information-value.sh
   4096 B ├─ run.sh
   4096 B ├─ CONTRIBUTORS.md
   4096 B ├─ planner-configs.sh
   4096 B ├─ API.md
   8192 B ├─ eval-thinned_clique.sh
   8192 B ├─ hooks
  12288 B ├─ resources
  12288 B ├─ utils
  12288 B ├─ eval-planners.sh
  16384 B ├─ doxy
  16384 B ├─ Doxyfile
  16384 B ├─ Doxyfile-api
  16384 B ├─ querygen.py
  20480 B ├─ CMakeLists.txt
  24576 B ├─ Pipfile.lock
  24576 B ├─ README.md
  36864 B ├─ LICENSE
  49152 B ├─ doc
  65536 B ├─ benchmark.hyper
 581632 B ├─ include
 856064 B ├─ benchmark
 876544 B ├─ unittest
1040384 B ├─ test
2236416 B ├─ src
5976064 B mutable

52 directories, 661 files

For this demonstration, I did remove my .erdtreerc file. So it's not a configuration issue.

I did another test with a fresh directory and just a single file and a single symlink:

$ mkdir demo
$ cd demo
$ touch afile
$ ln -sT afile sym
$ /bin/ls -l
total 0
-rw-r--r-- 1 immanuel users 0 Jun 27 09:06 afile
lrwxrwxrwx 1 immanuel users 5 Jun 27 09:06 sym -> afile
$ /bin/erd --level 1
0 B ┌─ afile
0 B ├─ sym → afile
 demo

1 file, 1 link

So here the symlink is shown.

Any idea what is going on?

Hi! Is the symlink in the first example perhaos ignored by the gitignore? Could you try passing -i as well?

Sorry for the late reply. The file compile_commands.json is listed in my global (user) gitignor but not in my project's gitignore. Passing the -i flag has no effect, the symlink is not shown. Removing the file from the global gitignore makes it be listed by erd.

So perhaps the -i flag only ignores the directories .gitignore but not the global one?

Thank you! Will investigate!

Closed by #231 :]

Will be included in the next release sometime in the next week!