TL;DR: put everything in modules. "WARNING: Method definition ... overwritten..."
This warning was extended to more cases in v0.5. It has caused some confusion, and some available explanations are themselves confusing. Here is another try. Overwriting a method (or type) has always been a formally undefined action - that is, there is no guarantee of consistency when you refer to the method after overwriting it ( <https://github.com/JuliaLang/julia/issues/17573>issue 265 <https://github.com/JuliaLang/julia/issues/265>). In v0.5 there were changes to the implementation of functions which make it more likely that this will cause conflicts and problems, so it is good that the warning is more prevalent. If you put your method definitions in modules, and reload the module files, you just get warnings for the module redefinitions. You would then also have to reload any modules which use the redefined ones, and so on. It is possible to cause conflicts with consistently redefined modules, but it takes some effort - unless you are foolish enough to type using MyVolatileModule in interactive sessions; that is asking for trouble. If even your global variables are in modules, consistent reloading will redefine them in terms of updated used modules. For production work (i.e. if you care about valid results) you should not overwrite definitions. If you use packages which themselves have overwrites, please file an issue. In your case, if the `@everywhere` clause includes definitions which were really not changed (not just the file text, but also any global context it refers to), you might not encounter conflicts. It is nevertheless a deprecated usage. It would seem to be either pointless or dangerous. Caveat: I am not a Julia developer, just a user with a tendency to stumble into edge cases. I happily defer to corrections from the experts, but regret that they didn't explain this issue in the regular documentation. On Thursday, October 6, 2016 at 7:42:36 PM UTC-4, digxx wrote: > > Something has changed since the code which ran with 0.4 does return a > warning now: > > include("C:\\Users\\Diger\\Documents\\Julia\\Diffusion\\bessel0_expansion_nlsolve.jl") > WARNING: Method definition WARNING: Method definition WARNING: Method > definition WARNING: Method definition WARNING: Method definition g_r(Any) > in module Main at > C:\Users\Diger\Documents\Julia\Rohrstroemung_function.jl:11 overwritten at > C:\Users\Diger\Documents\Julia\Rohrstroemung_function.jl:11. > WARNING: Method definition g_i(Any, Any) in module Main at > C:\Users\Diger\Documents\Julia\Rohrstroemung_function.jl:36 overwritten at > C:\Users\Diger\Documents\Julia\Rohrstroemung_function.jl:36. > > > I had a function file which i included with @everywhere > Now when I read it after the first time it seems to be that he doesnt like > to "overwrite" it again? > Why? >
