You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
while working to upgrade the tests of the import hook to the latest maturin ( PyO3/maturin-import-hook#9 ) I ran into an issue where many of the uniffi tests were failing due to missing symbols (failing job). I have been able to narrow down the issue so it can be reproduced without the import hook.
The issue seems to be related to the cache in $CARGO_TARGET_DIR/maturin/uniffi not being cleared between installs resulting in subsequent uniffi packages to be created incorrectly.
the script can be used with USE_MATURIN_NEW_FOO and USE_MATURIN_NEW_BAR set to 0 or 1 to switch between creating new packages and using the provided packages which are based on the maturin/test-crates/uniffi-pure-proc-macro. Both options fail but with different error messages.
(and the word foo does not appear anywhere in the bar package so it shouldn't be looking for the symbol uniffi_foo_fn_func_add)
At the point where maturin develop is run for bar, $CARGO_TARGET_DIR/maturin/uniffi contains foo.py and it is not cleared out when building bar, as can be seen using RUST_LOG=maturin=debug
with USE_MATURIN_NEW_FOO=1 and USE_MATURIN_NEW_BAR=0 the script fails when checking that bar is installed with:
OSError: /tmp/minimal/venv/lib/python3.12/site-packages/bar/libuniffi_example.so: cannot open shared object file: No such file or directory
with USE_MATURIN_NEW_FOO=1 and USE_MATURIN_NEW_BAR=1 the script succeeds because both packages produce an example.py in the cache so the bar version overwrites the foo version and there is no conflict.
Your maturin version (maturin --version)
maturin 1.7.6
Your Python version (python -V)
Python 3.12.2
Your pip version (pip -V)
pip 24.0
What bindings you're using
uniffi
Does cargo build work?
Yes, it works
If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash /)?
Yes
Steps to Reproduce
see above
The text was updated successfully, but these errors were encountered:
Bug Description
while working to upgrade the tests of the import hook to the latest maturin ( PyO3/maturin-import-hook#9 ) I ran into an issue where many of the uniffi tests were failing due to missing symbols (failing job). I have been able to narrow down the issue so it can be reproduced without the import hook.
The issue seems to be related to the cache in
$CARGO_TARGET_DIR/maturin/uniffi
not being cleared between installs resulting in subsequent uniffi packages to be created incorrectly.the script can be used with
USE_MATURIN_NEW_FOO
andUSE_MATURIN_NEW_BAR
set to 0 or 1 to switch between creating new packages and using the provided packages which are based on thematurin/test-crates/uniffi-pure-proc-macro
. Both options fail but with different error messages.inputs.zip
when cached cleared
when the cache is removed between calls to
maturin
develop by settingCLEAR_CACHE=1
the script executes successfully.with provided packages
with
USE_MATURIN_NEW_FOO=0
andUSE_MATURIN_NEW_BAR=0
the script fails when checking thatbar
is installed with:(and the word
foo
does not appear anywhere in thebar
package so it shouldn't be looking for the symboluniffi_foo_fn_func_add
)At the point where
maturin develop
is run forbar
,$CARGO_TARGET_DIR/maturin/uniffi
containsfoo.py
and it is not cleared out when buildingbar
, as can be seen usingRUST_LOG=maturin=debug
where
foo.py
is being added to thebar
wheelwith new packages
with
USE_MATURIN_NEW_FOO=1
andUSE_MATURIN_NEW_BAR=0
the script fails when checking thatbar
is installed with:with
USE_MATURIN_NEW_FOO=1
andUSE_MATURIN_NEW_BAR=1
the script succeeds because both packages produce anexample.py
in the cache so thebar
version overwrites thefoo
version and there is no conflict.Your maturin version (
maturin --version
)maturin 1.7.6
Your Python version (
python -V
)Python 3.12.2
Your pip version (
pip -V
)pip 24.0
What bindings you're using
uniffi
Does
cargo build
work?If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash
/
)?Steps to Reproduce
see above
The text was updated successfully, but these errors were encountered: