From 0e2c51399f075eea38a5b6985e5a62c67ea4a922 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20K=C5=82osko?= Date: Thu, 15 Aug 2024 12:20:34 +0900 Subject: [PATCH] Fix checksum file path to work when running as a dependency --- lib/xla.ex | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/xla.ex b/lib/xla.ex index acb8ff8..525220b 100644 --- a/lib/xla.ex +++ b/lib/xla.ex @@ -258,7 +258,11 @@ defmodule XLA do end defp checksum_path() do - Path.join(File.cwd!(), "checksum.txt") + # Note that this path points to the project source, which normally + # may not be available at runtime (in releases). However, we expect + # XLA to be called only during compilation, in which case this path + # is still available + Path.expand("../checksum.txt", __DIR__) end defp precompiled_targets(), do: @precompiled_targets