When I'm tiding up my simple packages, shadow
awlays comes out. Here is an example.
Packages1
BeginPackage["MyTest1`"]
f1[x0_]:=Module[{x=x0},StringReplace["sdfasdfwhat hahahahah",x_->"DummyInMyTest1"]]
g1[x0_]:=Module[{x=x0},StringReplace["sdfasdfwhat hahahahah",x_->"DummyInMyTest1"]]
EndPackage[]
Packages2
BeginPackage["MyTest2`"]
f2[x0_]:=Module[{x=x0},StringReplace["sdfasdfwhat hahahahah",x_->"DummyInMyTest2"]]
g2[x0_]:=Module[{x=x0},StringReplace["sdfasdfwhat hahahahah",x_->"DummyInMyTest2"]]
EndPackage[]
At first time, they are in one packages, now split them into two packages. Shadows about x is confusing, for I've used Module... actually I wish it to prevent the shadow problem but failed. Here we go
`$ContextPath`
Out[2]= {PacletManager`,QuantityUnits`,WebServices`,System`,Global`}
In[3]:= <<MyTest1`
In[4]:= <<MyTest2`
In[4]:= x0::shdw: Symbol x0 appears in multiple contexts {MyTest2`,MyTest1`}; definitions in context MyTest2` may shadow or be shadowed by other definitions. >>
In[4]:= x::shdw: Symbol x appears in multiple contexts {MyTest2`,MyTest1`}; definitions in context MyTest2` may shadow or be shadowed by other definitions. >>
In[4]:= x$::shdw: Symbol x$ appears in multiple contexts {MyTest2`,MyTest1`}; definitions in context MyTest2` may shadow or be shadowed by other definitions. >>
In[5]:= $ContextPath
Out[5]= {MyTest2`,MyTest1`,PacletManager`,QuantityUnits`,WebServices`,System`,Global`}
How to avoid these shadows but Quiet?
Maybe duplicates with some shadows Q/A. :)