When runic_pb_fft::Processor implements the runic_types::proc_block::ProcBlock trait it adds runic_types as a git dependency.
Like any normal trait, when we try to use the Processor's process() method inside runefile-parser tests we get the following compile error:
error[E0599]: no method named `process` found for struct `Processor` in the current scope
--> runefile-parser/src/lib.rs:38:20
|
38 | return fft.process(waveform, map);
| ^^^^^^^
|
= help: items from traits can only be used if the trait is in scope
= note: the following trait is implemented but not in scope; perhaps add a `use` for it:
`use runic_types::proc_block::ProcBlock;`
Makes sense, we need to pull in the runic_types::proc_block::ProcBlock trait before we can use it... But that doesn't work.
It looks like runic-pb-fft has added runic-types (from the hotg-ai/rune repository) as a git dependency and the runic_types::proc_block::ProcBlock that we use inside runefile-parser comes from ../runic-types. Cargo sees these two as completely different crates, meaning we are importing the wrong ProcBlock.
The two options I see are:
Move runic-pb-fft inside the rune repository so we aren't using git dependencies, or
Move runic-types into its own repository and make both runefile-parser and runic-pb-fft depend on it using git dependencies, probably also pinning the commit (e.g. runic-types = { git = "...", rev = "abcd1234" })
When
runic_pb_fft::Processor
implements therunic_types::proc_block::ProcBlock
trait it addsrunic_types
as a git dependency.Like any normal trait, when we try to use the
Processor
'sprocess()
method insiderunefile-parser
tests we get the following compile error:Makes sense, we need to pull in the
runic_types::proc_block::ProcBlock
trait before we can use it... But that doesn't work.It looks like
runic-pb-fft
has addedrunic-types
(from thehotg-ai/rune
repository) as a git dependency and therunic_types::proc_block::ProcBlock
that we use insiderunefile-parser
comes from../runic-types
. Cargo sees these two as completely different crates, meaning we are importing the wrongProcBlock
.The two options I see are:
runic-pb-fft
inside therune
repository so we aren't using git dependencies, orrunic-types
into its own repository and make bothrunefile-parser
andrunic-pb-fft
depend on it using git dependencies, probably also pinning the commit (e.g.runic-types = { git = "...", rev = "abcd1234" }
)