qstokkink / TriblerExperimental

GNU General Public License v3.0
6 stars 2 forks source link

Libsodium cache is not being used. #75

Closed qstokkink closed 3 months ago

qstokkink commented 3 months ago

We have moved on from #61 and libsodium.dll is now being stored and restored from the cache_libsodium_dll cache without failing. However, apparently the unit test script is STILL unable to find it:

Failed to locate libsodium (libnacl requirement), downloading latest dll!
qstokkink commented 3 months ago

This may be due to the re-used logic from IPv8, in windows_missing_libsodium():

# Try to find it in the local directory. This is where we'll download it anyway.
os.add_dll_directory(os.path.dirname(__file__) or os.path.abspath('.'))

This file exists in ./pyipv8/run_all_tests.py. My assumption is that it:

  1. Attempts to find the libtorrent.dll in ./pyipv8/ and fails.
  2. Downloads libtorrent.dll to to the current directory.
  3. The tests pass.
  4. The cache is saved from the current directory correctly.
qstokkink commented 3 months ago

If my intuition is correct, I'll fix this in IPv8. First, I'll create a PR here to verify.

qstokkink commented 3 months ago

Confirmed. Using . instead of os.path.dirname(__file__) fixes the issue.