… struggling to even phrase that title properly, so I’m probably doing something silly
I’m relying on BSON to store some objects created and typed by my own package MyPkg
as artifacts: BSON.@save path some_object
where typeof(some_object) <: MyPkg.SomeType
. To allow users of MyPkg
to load the artifact, I’m then providing a simple function MyPkg.load_some_object
which essentially just uses BSON again to load the object.
The problem I’m facing is that since typeof(some_object) <: MyPkg.SomeType
, BSON complains that is needs MyPkg
to read the file. Things actually work out when I call using MyPkg
inside the package source code before load_some_object
, but this just smells like trouble (I guess?).
Any thoughts/advice would be much appreciated