# How to get the source of code loading warnings?

**URL:** <https://discourse.julialang.org/t/how-to-get-the-source-of-code-loading-warnings/23884>\
**Category:** General Usage\
**Created:** [May 5, 2019, 7:51pm UTC](https://discourse.julialang.org/t/how-to-get-the-source-of-code-loading-warnings/23884 "2019-05-05T19:51:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Post date:** [May 5, 2019, 7:51pm UTC](https://discourse.julialang.org/t/how-to-get-the-source-of-code-loading-warnings/23884/1 "2019-05-05T19:51:38Z")

</div>

I get this warning in one of my apps, seems to be Pkg related:

```julia
┌ Warning: Package Genie does not have SearchLight in its dependencies:
│ - If you have Genie checked out for development and have
│ added SearchLight 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 Genie
└ Loading SearchLight into Genie from project dependency, future warnings for Genie are suppressed.

```

Despite searching everywhere where I could think of, I can’t find the source of the warning. Genie does not have SearchLight in its dependencies (and it shouldn’t have it) so I’m thinking that it might be some eval into Genie from an external package. Just can’t identify the culprit.

Not sure what is the value of warnings if there is no indication of the lines of code raising them. If I were to report an issue, as instructed, wouldn’t it be better to have this extra info for my report?

---

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [May 5, 2019, 8:32pm UTC](https://discourse.julialang.org/t/how-to-get-the-source-of-code-loading-warnings/23884/2 "2019-05-05T20:32:27Z")

</div>

Weird. All my `@warn` print out with the line and file they happened on…

---

<div class="post-metadata">

**Author:** ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Post date:** [May 5, 2019, 9:15pm UTC](https://discourse.julialang.org/t/how-to-get-the-source-of-code-loading-warnings/23884/3 "2019-05-05T21:15:26Z")

</div>

Yes, mine too - except this 🙂

---

<div class="post-metadata">

**Author:** ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Post date:** [May 6, 2019, 1:07pm UTC](https://discourse.julialang.org/t/how-to-get-the-source-of-code-loading-warnings/23884/4 "2019-05-06T13:07:20Z")

</div>

This comes from Pkg. Pkg is warning you that something is loading `SearchLight` without having declared _which_ `SearchLight` it means (at the level of UUID, which is the real identity of a package). So it’s finding a random package whose name happens to be `SearchLight` and hoping for the best.

Several of Genie’s plugins load SearchLight, so this warning may not be surprising: [https://github.com/genieframework/Genie.jl/search?q=SearchLight&unscoped\_q=SearchLight](https://github.com/genieframework/Genie.jl/search?q=SearchLight&unscoped_q=SearchLight)

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [May 6, 2019, 1:11pm UTC](https://discourse.julialang.org/t/how-to-get-the-source-of-code-loading-warnings/23884/5 "2019-05-06T13:11:31Z")

</div>

> [@tim.holy](#):
>
> This comes from Pkg.

Technically, it is independent of Pkg and comes from Julia’s code loading:

> <https://github.com/JuliaLang/julia/blob/f189ae4de8cdfd46908c835858e33cf6765465a4/base/loading.jl#L891-L900>

---

<div class="post-metadata">

**Author:** ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Post date:** [May 6, 2019, 1:18pm UTC](https://discourse.julialang.org/t/how-to-get-the-source-of-code-loading-warnings/23884/6 "2019-05-06T13:18:11Z")

</div>

Thanks @tim.holy

The `plugins` folder is not yet used - it is just stuff I dumped there to be converted into plugins at some point in the future. The files are not included nor is the folder added to `LOAD_PATH`. I expected they won’t be picked up.

===

Update 1: it’s definitely not those, I removed everything that was not actively used by Genie and run a search which didn’t return “SearchLight” at all. So my guess is, something gets `eval`ed into Genie.

Anyway, it would be great if Julia would share the guilty file and line triggering the warning.
