dtolnay / inventory

Typed distributed plugin registration
Apache License 2.0
986 stars 43 forks source link

doesn't work inside module #34

Closed mimoo closed 3 years ago

mimoo commented 3 years ago

Hey @dtolnay, thanks a lot for this crate.

I'm trying to register submits from different modules, and it only works at the top level. Am I missing something?

  inventory::submit! {
      OcamlFunc::new("something") # this works
  }

  pub mod inside_mod {
      inventory::submit! {
          super::OcamlFunc::new("something_else") # this doesn't appear in the iter
      }
  }
korrat commented 1 year ago

@mimoo Did you figure out what was causing your issue? Could you help me understand what went wrong?

mimoo commented 1 year ago

no, I ended up using another crate (const-random)