Commit caa67bc
committed
git add src/omnipkg/_vendor/uv src/omnipkg/_vendor/uv_ffi/__init__.py
git commit -m "feat(ffi): Adapt to new uv-ffi error reporting and self-healing engine" -m "Context & Problem:
Previously, omnipkg's interaction with the uv-ffi engine was a black box. A failure (rc=1) offered no insight into the cause, forcing a fallback to the slower daemon without knowing if the issue was a transient cache problem or a genuine resolution conflict.
Solution & Changes:
1. **Submodule Update:**
- Updates the \`uv\` submodule to the latest version, which incorporates the new **self-healing logic**. The Rust engine can now detect and recover from stale PyPI cache failures internally.
2. **Expose Detailed Errors:**
- The \`uv_ffi.run()\` function now returns a 4-tuple: \`(rc, installed, removed, err_msg)\`. The fourth element contains the detailed error string from Rust, making failures transparent.
3. **Robust Python Wrapper:**
- The Python wrapper in \`uv_ffi/__init__.py\` is updated to handle this new signature.
- Crucially, a **backward-compatibility shim** has been added. It checks the length of the returned tuple and gracefully pads an empty error string if an older 3-tuple build of the native extension is detected. This prevents \`ValueError\` exceptions and ensures robust behavior across different build states.
4. **Expose Manual Cache Control:**
- The \`clear_registry_cache\` function is now exposed from the FFI, allowing for manual cache invalidation if needed for debugging or advanced scripting.
Impact:
This makes omnipkg's installation process significantly more transparent and debuggable. The self-healing engine reduces unnecessary fallbacks to the slow daemon, while explicit error messages allow for better logging and user feedback."1 parent af30f19 commit caa67bc
2 files changed
Lines changed: 18 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | | - | |
14 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
15 | 20 | | |
16 | 21 | | |
17 | 22 | | |
| |||
41 | 46 | | |
42 | 47 | | |
43 | 48 | | |
44 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
0 commit comments