Warning: Package A does not have B in its dependencies

I’m getting the following warning when precompiling a package I’m working on:

julia> using FlashWeave
[ Info: Recompiling stale cache file <some_path>/.julia/compiled/v1.0/FlashWeave/PSwZf.ji for FlashWeave [2be3f83a-7913-5748-9f20-7d448995b934]
┌ Warning: Package FlashWeave does not have SharedArrays in its dependencies:
│ - If you have FlashWeave checked out for development and have
│   added SharedArrays 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 FlashWeave
└ Loading SharedArrays into FlashWeave from project dependency, future warnings for FlashWeave are suppressed.

I’m confused because as far as I understand SharedArrays is a stdlib package and thus does not need to be declared in REQUIRE. Other stdlib packages (Distributed, Statistics etc.) do not result in this warning. Strangely, this currently does not show up in Travis or Appveyor (it did in some earlier version, though). Any ideas?

The detection for stdlibs are not working when you separate a using line to multiple ones. You can replace https://github.com/meringlab/FlashWeave.jl/blob/2e76b4217c3087995533b7e41fe56778d91b723c/src/FlashWeave.jl#L4-L5 that with

using Distributed, SparseArrays, Statistics, DelimitedFiles, Random
using SharedArrays, LinearAlgebra, Dates

and It should detect SharedArrays, LinearAlgebra and Dates.


Thanks a lot, that solved it! Is this currently on the agenda for future improvements (quick issue search in the Pkg repo didn’t show anything)? Seems like a subtle thing to get wrong.

1 Like

The long term solution is to switch away from REQUIRE files to Project.toml files in which stdlib dependencies must be given explicitly.


Would love to do that, but it breaks registration with attobot.

Yes, attobot needs to be replaced with a new registry version of attobot. There’s a lot of package development infrastructure that needs to be replaced in order to switch over; it’s in progress. If you want to follow and/or help, see the #pkg-dev channel on Slack; we have a weekly call on Tuesdays at 2 pm US Eastern.


Thanks, I will follow, then see how I can help.