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
As it turned out cdylibs do not play well with integration tests. The cdylib is build
with panic="abort" but the tests require panic="unwind". This results in building the lib
twice if there are integration tests and leads to the following warning and eventually to build failures.
warning: output filename collision.
The lib target iceoryx2_ffi in package iceoryx2-ffi v0.3.0 (C:\Users\ekxide\iceoryx2\iceoryx2-ffi\ffi) has the same output filename as the lib target iceoryx2_ffi in package iceoryx2-ffi v0.3.0 (C:\Users\ekxide\iceoryx2\iceoryx2-ffi\ffi).
Colliding filename is: C:\Users\ekxide\iceoryx2\target\release\deps\iceoryx2_ffi.lib
The targets should have unique names.
Consider changing their names to be unique or compiling them separately.
This may become a hard error in the future; see rust-lang/cargo#6313.
Workaround
Currently the workaround is to have the integrationtests in the module. This would give access to private API though. To circumvent this problem only pub(super) shall be used if an API needs to be available in other modules but not pub(crate). With the following folder structure the tests can again only be written as whitebox tests
Brief description
As it turned out
cdylib
s do not play well with integration tests. Thecdylib
is buildwith
panic="abort"
but the tests requirepanic="unwind"
. This results in building the libtwice if there are integration tests and leads to the following warning and eventually to build failures.
Workaround
Currently the workaround is to have the integrationtests in the module. This would give access to private API though. To circumvent this problem only
pub(super)
shall be used if an API needs to be available in other modules but notpub(crate)
. With the following folder structure the tests can again only be written as whitebox testsThe text was updated successfully, but these errors were encountered: