# Disable package extension

**URL:** https://discourse.julialang.org/t/disable-package-extension/123779
**Category:** General Usage
**Tags:** package, pkg, modelingtoolkit, infiniteopt
**Created:** [December 12, 2024, 6:26pm UTC](https://discourse.julialang.org/t/disable-package-extension/123779 "2024-12-12T18:26:38Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![afossa](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@afossa](https://discourse.julialang.org/u/afossa)
#### Post date: [December 12, 2024, 6:26pm UTC](https://discourse.julialang.org/t/disable-package-extension/123779/1 "2024-12-12T18:26:38Z")

</div>

Hello,

Is it possible to “disable” an extension of a package, marked with `[extension]` in the package `Project.toml`?

My use case is the following:  
I have an environment with `ModelingToolkit` as dependency, and I want to add `InfiniteOpt#master` to use some of the new (unreleased) features of `InfiniteOpt`.

However, this raises an error during precompilation since `MTKInfiniteOptExt`, an extension of `ModelingToolkit` to ineract with `InfiniteOpt`, does not work with the `master` version of `InfiniteOpt`. I am not interested in using this extension, so this is why for now I will be happy if it was possible to just “disable” it.

For reference, the error I get is:

```julia
ERROR: LoadError: UndefVarError: `AbstractInfOptExpr` not defined in `InfiniteOpt`

```

Thanks!

---

<div class="post-metadata">

### Author: ![goerz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/goerz/32/3269_2.png) [@goerz](https://discourse.julialang.org/u/goerz)
#### Post date: [December 12, 2024, 6:40pm UTC](https://discourse.julialang.org/t/disable-package-extension/123779/2 "2024-12-12T18:40:59Z")

</div>

You will have to clone the package, modify its `Project.toml`, and install it with `Pkg.develop`

---

<div class="post-metadata">

### Author: ![afossa](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@afossa](https://discourse.julialang.org/u/afossa)
#### Post date: [December 12, 2024, 8:07pm UTC](https://discourse.julialang.org/t/disable-package-extension/123779/3 "2024-12-12T20:07:30Z")

</div>

Okay that’s what I’ve also thought. Thanks
