Package Dependency Warning Cause & Fix

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

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

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

 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.

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

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.