# Automatically load extension if available

**URL:** https://discourse.julialang.org/t/automatically-load-extension-if-available/116980
**Category:** General Usage
**Tags:** question, package
**Created:** [July 12, 2024, 7:37pm UTC](https://discourse.julialang.org/t/automatically-load-extension-if-available/116980 "2024-07-12T19:37:17Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![bclyons12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bclyons12/32/33734_2.png) [@bclyons12](https://discourse.julialang.org/u/bclyons12)
#### Post date: [July 12, 2024, 8:32pm UTC](https://discourse.julialang.org/t/automatically-load-extension-if-available/116980/2 "2024-07-12T20:32:26Z")

</div>

This is similar to the idea here, but I don’t see this particular point resolved in the thread.

> [@Are extension packages importable?](https://discourse.julialang.org/t/are-extension-packages-importable/92527/5):
>
> To be concrete, suppose the package Foo has an extension Ext which depends on Bar and Baz. Then it may be nice to let pkg\> add Foo[Ext] be a shorthand for pkg\> add Foo, Bar, Baz (thus allowing the fact that Ext depends on Bar and Baz to be an implementation detail). And further, it may be nice to let import Foo[Ext] be a shorthand for import Foo, Bar, Baz const Ext = Base.get\_extension(Foo, :Ext)

I wouldn’t need the actual Ext extension module exposed to the REPL, just a shorthand to load the necessary packages.

---

_[View the full topic](https://discourse.julialang.org/t/automatically-load-extension-if-available/116980)._
