but in both cases Base.get_extension(Foo,:FooBarExt) returns nothing, I guess extension modules are loaded later? If this were a function intead of a type, I could just create a stub function foo end in Foo and use it anywhere, but I don’t know how to do this with a type. Any suggestions?
I guess move the type definition from FooBarExt into Foo?
technically because your last package depends on both Foo and Bar Julia should somehow know for sure FooBarExt will be loaded but it doesn’t due to either design or implementation flaw? I think there may be some lazy or eager loading going on
Presumably you’d want this type to be accessible in a module which uses both Foo and Bar, but if so where would the definition come from? It would be strange for a definition from some package you didn’t actually import in any way to appear in your module. You could potentially make a parametric type.
I don’t need it to look exactly like foo(::MyFooBarType) sorry if that was confusing. I just can’t figure out any way to get at that type, including using Base.get_extension.