# Using Plots in an extension causes precompile warnings and errors

**URL:** <https://discourse.julialang.org/t/using-plots-in-an-extension-causes-precompile-warnings-and-errors/106159>\
**Category:** General Usage\
**Tags:** plots\
**Created:** [November 13, 2023, 5:00pm UTC](https://discourse.julialang.org/t/using-plots-in-an-extension-causes-precompile-warnings-and-errors/106159 "2023-11-13T17:00:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Allan\_Baker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/allan_baker/32/42645_2.png) [@Allan\_Baker](https://discourse.julialang.org/u/Allan_Baker)\
**Post date:** [November 13, 2023, 5:00pm UTC](https://discourse.julialang.org/t/using-plots-in-an-extension-causes-precompile-warnings-and-errors/106159/1 "2023-11-13T17:00:56Z")

</div>

In my package with multiple modules have some plot functions for some data types that I am trying to move into extensions to remove plots dependency and allow a Makie option as well. The module extensions which are based on RecipesBase move over fine, but the ones based on Plots give Precompile warnings and seem to fail because of this (but I could be on a wild goose chase.)

I tried putting **precompile** (false) at the top of the extension with the segregated plot routines, and I thought that worked, but testing doesn’t like it so much. I was hoping I could still get precompile on the majority of the module, and not worry about it for the Plotting portion if that is required.

I thought I’d ask is there a standard way to do this. I ultimately don’t want Plots as a dependency for this, do I need to create a whole new package just for plotting some of this stuff and forget the extensions?

Does this make sense?

---

<div class="post-metadata">

**Author:** ![Benny](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Benny](https://discourse.julialang.org/u/Benny)\
**Post date:** [November 13, 2023, 5:29pm UTC](https://discourse.julialang.org/t/using-plots-in-an-extension-causes-precompile-warnings-and-errors/106159/2 "2023-11-13T17:29:55Z")

</div>

> [@Allan\_Baker](#):
>
> the ones based on Plots give Precompile warnings and seem to fail

> [@Allan\_Baker](#):
>
> I tried putting **precompile** (false) at the top of the extension with the segregated plot routines, and I thought that worked, but testing doesn’t like it so much

Curious what the warnings or errors are saying in these 2 cases, and if there are specific lines triggering them
