Stream: helpdesk (published)

Topic: Pkg writing: use pkg and export their namespace


view this post on Zulip Timothy (Jun 25 2021 at 11:45):

I'm writing a package that uses features from a number of others (ApproxFun, LinearAlgebra, IntervalSets, ...).

I would like to have the exports from those packages available too, just as if the user were to execute using ApproxFun, LinearAlgebra, IntervalSets, .... I've tried a bit of googling, but haven't come across an answer yet. If someone might know how this is done, that would be brilliant!

view this post on Zulip Felix Kastner (Jun 25 2021 at 12:36):

Look at Reexport.jl

view this post on Zulip Timothy (Jun 25 2021 at 12:54):

Thanks! I was trying to find some sort of base-julia functionality, but I see that doesn't exist from the README :slight_frown:

view this post on Zulip Simeon Schaub (Jun 25 2021 at 15:40):

Note that this is not necessarily a good idea though, since if you are reexporting someone else's API, you have to tag a breaking version any time any of your reexports releases a breaking version. It's generally preferable to have users be explicitly aware which packages they depend on, so compat can be handled appropriately.


Last updated: Nov 06 2024 at 04:40 UTC