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
I have a kinda complicated setup, so it would be hard to provide a minimal reproducible version, but I'll try to describe it.
In summary, I have a wrapper around cucumber, and various crates that define their own steps, using this wrapper for the World implementation. This most of the time works fine, and I'm able to create a runner crate that uses all of those crates, and use the steps defined on them, but in some occasions, which I could not fully identify, I noticed that the steps are simply not included in the compiled binary. I get the step doesn't match any function error.
There was one occasion where compiling in release or debug mode would yield different results: one of them had the steps, the other didn't (I don't recall which was which, but I'd assume it could happen that the release mode compilation removed the steps as an optimization?).
I inspected the binary using unix's string utility (parts of strings used in the step names should be visible in the binary as they are static), but could not find any trace of those steps.
I suspect this has to do with the way steps are registered via the inventory crate. That crate says something about calls to collect! being in the same crate that defines the plugin type. Not sure if this is the issue here.
Just opening this to raise awareness of this issue, I cannot easily reproduce it, it just happens in certain situations involving multiple crates defining steps.
The text was updated successfully, but these errors were encountered:
tyranron
added
time sink
You may lose your mind if you try to fix this, but I won't stop you
k::design
Related to overall design and/or architecture
labels
Sep 28, 2023
@yds12 this is something we're dependent on inventory for. Not sure, we can do something about it from our side, because the way we're using inventory is quite trivial, no shenanigans at all.
Can you also specify at which platform does this happen?
Also, try codegen-units = 1 for this, it has helped us many times with inventory.
Hi @tyranron, thanks for the reply. I have only observed this bug in MacOS (Ventura). I'll try your suggestion later today and let you know in case it works.
I have a kinda complicated setup, so it would be hard to provide a minimal reproducible version, but I'll try to describe it.
In summary, I have a wrapper around
cucumber
, and various crates that define their own steps, using this wrapper for theWorld
implementation. This most of the time works fine, and I'm able to create a runner crate that uses all of those crates, and use the steps defined on them, but in some occasions, which I could not fully identify, I noticed that the steps are simply not included in the compiled binary. I get thestep doesn't match any function
error.There was one occasion where compiling in release or debug mode would yield different results: one of them had the steps, the other didn't (I don't recall which was which, but I'd assume it could happen that the release mode compilation removed the steps as an optimization?).
I inspected the binary using unix's
string
utility (parts of strings used in the step names should be visible in the binary as they are static), but could not find any trace of those steps.I suspect this has to do with the way steps are registered via the
inventory
crate. That crate says something about calls tocollect!
being in the same crate that defines the plugin type. Not sure if this is the issue here.Just opening this to raise awareness of this issue, I cannot easily reproduce it, it just happens in certain situations involving multiple crates defining steps.
The text was updated successfully, but these errors were encountered: