Stream: helpdesk (published)

Topic: ✔ dependency on submodule of a package


view this post on Zulip Leandro Martínez (Aug 19 2022 at 17:17):

Or, more simply. If I import MyPackage instead (I don't want to bring into scope the exported names of MyPackage):

module MyOtherPackage
    import MyPackage
    # how to bring into escope MyPackage.Submodule exported functions?
end

How can I then bring into scope the MyPackage.Submodule exported functions without making Submodule itself be interpreted as a directy dependency? Is there a workaround around that?

view this post on Zulip Leandro Martínez (Aug 19 2022 at 17:28):

Ok, this works:

module MyOtherPackage
    import MyPackage
    using .MyPackage.Submodule
    ...
end

view this post on Zulip Notification Bot (Aug 19 2022 at 17:29):

Leandro Martínez has marked this topic as resolved.


Last updated: Oct 02 2023 at 04:34 UTC