# Package Dependency Warning Cause & Fix

**URL:** <https://discourse.julialang.org/t/package-dependency-warning-cause-fix/77732>\
**Category:** Tooling\
**Tags:** package, development\
**Created:** [March 11, 2022, 3:01am UTC](https://discourse.julialang.org/t/package-dependency-warning-cause-fix/77732 "2022-03-11T03:01:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TI36XPro](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ti36xpro/32/33658_2.png) [@TI36XPro](https://discourse.julialang.org/u/TI36XPro)\
**Post date:** [March 11, 2022, 3:01am UTC](https://discourse.julialang.org/t/package-dependency-warning-cause-fix/77732/1 "2022-03-11T03:01:31Z")

</div>

Hello!

I am developing a package and am getting a warning that I do not understand. I would appreciate any help on how to diagnose and fix this. I am new to developing packages so if I am not using a best practice or going about something in a dumb way please tell me!

My package looks like this

```julia
module MyPack

using Static Arrays
import Base: size, length # i add some methods to base methods for my types

# Define some custom structs
struct MyStruct
  num::Float64
  vec::Vector{Float64}
end

# Lots of little convenience, plotting, and helper functions are defined in utils.jl
include("utils/utils.jl")
using .utils

# code hereafter is the "heavy lifting code", lots of big functions with lots of computations

end

```

And `utils.jl` looks like

```julia
module utils

import ..MyPack

using CairoMakie, FFTW

export # long list of functions

# Here downward lots of helper functions for types of MyStruct

end

```

Now when I try to do `using MyPack` in a Julia script I get the following warning

```julia
 Warning: Package MyPack does not have CairoMakie in its dependencies:
│ - If you have MyPack checked out for development and have
│ added CairoMakie as a dependency but haven't updated your primary
│ environment's manifest file, try `Pkg.resolve()`.
│ - Otherwise you may need to report an issue with MyPack 
└ Loading CairoMakie into MyPack from project dependency, future warnings for MyPack are suppressed.

```

I have done the following:

- Confirmed that `CarioMakie` is a dependency of `MyPack` by activating the package and then doing `add CairoMakie` in the package REPL
- Inspecting the manifest file which shows `CairoMakie` is there
- Tried doing `Pkg.resolve()` for my package’s project environment

Still the warning persists. If it matters, any time I start Julia I have `Revise` loaded first via `startup.jl`.

---

<div class="post-metadata">

**Author:** ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Post date:** [March 11, 2022, 8:51am UTC](https://discourse.julialang.org/t/package-dependency-warning-cause-fix/77732/2 "2022-03-11T08:51:23Z")

</div>

Have you bumped the patch-version of `MyPack` after adding the dependency properly?

---

<div class="post-metadata">

**Author:** ![TI36XPro](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ti36xpro/32/33658_2.png) [@TI36XPro](https://discourse.julialang.org/u/TI36XPro)\
**Post date:** [March 18, 2022, 3:03am UTC](https://discourse.julialang.org/t/package-dependency-warning-cause-fix/77732/3 "2022-03-18T03:03:43Z")

</div>

I thought I had updated the environment I was running the script from. Apparently not though. I closed out everything, went back in, updated my environment using `Pkg.resolve()` and then it started working properly. This is what I get for working late at night! Sorry for any confusion.
