fresh-borzoni opened a new pull request, #3598:
URL: https://github.com/apache/fluss/pull/3598

   ### Purpose
   
   Fixes the recurring `elixir-integration` CI failure where the Rust NIF fails 
to load:
   
   ```
   Failed to load NIF library: '.../fluss_nif.so: cannot open shared object 
file: No such file or directory'
   (UndefinedFunctionError) function Fluss.Native.table_descriptor_new/2 is 
undefined (module Fluss.Native is not available)
   ```
   
   Related to #3586 (same lane, different root cause).
   
   ### Root cause
   
   The `elixir-integration` job cached both the Swatinem Rust `target/` and the 
Mix `_build` (keyed on `mix.lock`). When both cache-hit, Mix's incremental 
compiler sees the `fluss` app already compiled in the restored `_build` 
manifest and **skips the rustler step**, so `fluss_nif.so` is never (re)placed 
— and the cached `_build` doesn't carry a usable `.so`. Tests then can't load 
`Fluss.Native`.
   
   The first run in the repo passed (cache miss → full compile → `.so` placed); 
a later run then cached a `_build` lacking the `.so`, and every exact-key hit 
since restored that poisoned state.
   
   ### Brief change log
   
   - Cache only `deps`, not `_build`, so `mix compile` always runs the rustler 
step and re-places the NIF. The expensive native build stays cached via the 
Rust `target/` cache, so the only added cost is the (small) Elixir bytecode 
recompile.
   - Bump the cache key prefix (`-mix-` → `-mixdeps-`) to abandon the poisoned 
caches.
   
   ### Tests
   
   Validated via CI (`elixir-integration`); the change only affects that job's 
caching.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to