Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Determine how symbols in a first context depend on symbols in a second context
| ResourceFunction["ContextDependencies"]["context1`", "context2`"] finds all definitions of symbols in context1 that depend on a symbol from context2. | 
Set up some dependent definitions:
| In[1]:= | ![Begin["myContext`"];
     myFunc[x_] := yourContext`yourFunc[x + 1]
     var1 = yourContext`symbol1;
End[];
Begin["yourContext`"];
     yourFunc[x_] := x^2
End[];](https://www.wolframcloud.com/obj/resourcesystem/images/191/191c80a6-f91e-49bd-87ed-5da3c12fd182/147740b7fb32d05d.png) | 
Get symbol dependencies linking the two contexts:
| In[2]:= | ![ResourceFunction["ContextDependencies"]["myContext`", "yourContext`"]](https://www.wolframcloud.com/obj/resourcesystem/images/191/191c80a6-f91e-49bd-87ed-5da3c12fd182/5829891725d589c1.png) | 
| Out[2]= |  | 
Get symbol dependencies in the other direction:
| In[3]:= | ![ResourceFunction["ContextDependencies"]["yourContext`", "myContext`"]](https://www.wolframcloud.com/obj/resourcesystem/images/191/191c80a6-f91e-49bd-87ed-5da3c12fd182/593d57b5b8a63ce2.png) | 
| Out[3]= |  | 
Wolfram Language 11.3 (March 2018) or above
This work is licensed under a Creative Commons Attribution 4.0 International License