Symbolic links to source files and finding relative files?

No. Please look at the github issue. The situation is that we have a directory D with files f1.pl and f2.pl where f1.pl uses :- use_module(f2). From anywhere, we can run swipl /path/to/D/f1.pl and this will work fine because relative file names are searched relative to the file currently being loaded first and, next, relative to the process working directory.

If, however, we use #!/usr/bin/env swipl in f1.pl and now create a symlink from ~/bin/f1 to /path/to/D/f1.pl, running f1 complains that f2.pl does not exist. A similar scenario with Python is claimed to work (not tested myself).

So, the question is which rules about symlink handling make this work for Python, how do other languages handle this and what should we do (including the option to do nothing :slight_smile: )