Closed Nuc1eoN closed 2 years ago
I haven't looked at the code, but my guess is that all that FindDependencies reads the Dummy
directory and returns some entry that matches (reading the directory in filesystem (i.e. random) order), rather than the best one. If that is the case, for detecting whether a dependency is missing or not, that behavior would be sufficient — but for use with Runner, probably not ideal as it would potentially link with older libraries when newer ones are installed.
Some C debugging of FindDependencies.c would explain what's going on.
but for use with Runner, probably not ideal as it would potentially link with older libraries when newer ones are installed.
Yes absolutely, especially since Runner is used by Compile internally.
So if you are in installing a new program with Compile, it will potentially link the wrong dependency version in the build process, potentially leading to a failed build.
This is exactly what happened for me and it took me some time and effort to finally nail it down to Runner and eventually FindDependencies
.
Yep, that's a bug. I'm pushing a fix now -- thanks for the heads up!
@lucasvr Thanks a lot, that fixed it!
PS: In case you have forgot, please look into irc chat. I have sent you a message (10 days ago^^).
I have observed some oddities with
FindDependencies
which is being used byRunner
and thus also byCompile
.To follow create the following scenario:
You have a program called
Dummy
under/Programs
with the following versions:You can follow along by recreating this file system structure on your system.
Now create a
Dependencies
file in your home dir with the following content:Now run
FindDependencies
on that file:The expected result is
1.13
right? However the actual result is:Obviously wrong! The first guess here is that
FindDependencies
sees1.6
>1.13
, right? One might guess it is due to the double digits!However if so, how does the following make any sense: Now put
Dummy > 1.6
into yourDependencies
file. NowFindDependencies
has the following result:Bollocks! So suddenly
FindDependencies
resolves1.6
<1.13
!I struggle to understand what is going on here.