{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/18725","repository_url":"https://api.github.com/repos/JuliaLang/julia","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/18725/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/18725/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/18725/events","html_url":"https://github.com/JuliaLang/julia/issues/18725","id":180030374,"number":18725,"title":"Julia 0.5 now complains about redefining methods","user":{"login":"dcarrera","id":89128,"avatar_url":"https://avatars.githubusercontent.com/u/89128?v=3","gravatar_id":"","url":"https://api.github.com/users/dcarrera","html_url":"https://github.com/dcarrera","followers_url":"https://api.github.com/users/dcarrera/followers","following_url":"https://api.github.com/users/dcarrera/following{/other_user}","gists_url":"https://api.github.com/users/dcarrera/gists{/gist_id}","starred_url":"https://api.github.com/users/dcarrera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcarrera/subscriptions","organizations_url":"https://api.github.com/users/dcarrera/orgs","repos_url":"https://api.github.com/users/dcarrera/repos","events_url":"https://api.github.com/users/dcarrera/events{/privacy}","received_events_url":"https://api.github.com/users/dcarrera/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-09-29T12:05:50Z","updated_at":"2016-09-29T13:56:49Z","closed_at":null,"body":"I recently upgraded to Julia 0.5 and now Julia raises a warning every time I redefine a function, which in my workflow happens **all the time**. I spent most of my day editing code and experimenting. My usual workflow looks like this:\r\n\r\n```julia\r\njulia> include(\"foo.jl\");\r\n... look at the results, make edits ...\r\n\r\njulia> include(\"foo.jl\");\r\n... look at the results, get an idea, make edits ...\r\n\r\njulia> include(\"foo.jl\");\r\n... look at the results, get an idea, make edits ...\r\n\r\njulia> include(\"foo.jl\");\r\n... look at the results, get an idea, make edits ...\r\n\r\njulia> include(\"foo.jl\");\r\n... look at the results, get an idea, make edits ...\r\n\r\njulia> include(\"foo.jl\");\r\n... look at the results, get an idea, make edits ...\r\n\r\n```\r\n\r\nNeedless to say, every single time I `include(\"foo.jl\")` I define all the methods in `foo.jl`. Now, with the new Julia 0.5 my output looks like this:\r\n\r\n```julia\r\njulia>  include(\"main.jl\");\r\nWARNING: Method definition plot_obs() in module Main at /home/daniel/Science/C4/final-plots.jl:6\r\n overwritten at /home/daniel/Science/C4/final-plots.jl:6.\r\nWARNING: Method definition plot_obs_mass_ratios() in module Main at /home/daniel/Science/\r\nC4/final-plots.jl:158 overwritten at /home/daniel/Science/C4/final-plots.jl:158.\r\nWARNING: Method definition plot_chosen_delta_as() in module Main at /home/daniel/Science/\r\nC4/final-plots.jl:201 overwritten at /home/daniel/Science/C4/final-plots.jl:201.\r\nWARNING: Method definition plot_chosen_delta_as(Any) in module Main at \r\n/home/daniel/Science/C4/final-plots.jl:201 overwritten at /home/daniel/Science/C4/final-plots.jl:201.\r\nWARNING: Method definition parse_group(Any) in module Main at \r\n/home/daniel/Science/C4/simulations.jl:16 overwritten at /home/daniel/Science/C4/simulations.jl:16.\r\nWARNING: Method definition plot_box(Any, Any, Any) in module Main at \r\n/home/daniel/Science/C4/simulations.jl:147 overwritten at /home/daniel/Science/C4/simulations.jl:147.\r\nWARNING: Method definition plot_theilsen() in module Main at \r\n/home/daniel/Science/C4/simulations.jl:194 overwritten at /home/daniel/Science/C4/simulations.jl:194.\r\nWARNING: Method definition plot_three_planets() in module Main at \r\n/home/daniel/Science/C4/simulations.jl:280 overwritten at /home/daniel/Science/C4/simulations.jl:280.\r\nWARNING: Method definition read_all() in module Main at /home/daniel/Science/C4/catalog.jl:5\r\n overwritten at /home/daniel/Science/C4/catalog.jl:5.\r\nWARNING: Method definition read_mult() in module Main at /home/daniel/Science/C4/catalog.jl:60 \r\noverwritten at /home/daniel/Science/C4/catalog.jl:60.\r\nWARNING: Method definition plot_pairs(Any) in module Main at /home/daniel/Science/C4/catalog.jl:91\r\n overwritten at /home/daniel/Science/C4/catalog.jl:91.\r\nWARNING: Method definition get_limits(Any, Any, Any) in module Main at \r\n/home/daniel/Science/C4/gladman.jl:20 overwritten at /home/daniel/Science/C4/gladman.jl:20.\r\nWARNING: Method definition get_limits(Any, Any, Any, Any, Any) in module Main at \r\n/home/daniel/Science/C4/gladman.jl:56 overwritten at /home/daniel/Science/C4/gladman.jl:56.\r\nWARNING: Method definition draw_frame_gladman(Any) in module Main at \r\n/home/daniel/Science/C4/gladman.jl:99 overwritten at /home/daniel/Science/C4/gladman.jl:99.\r\nWARNING: Method definition draw_frame_chambers(Any, Any) in module Main at \r\n/home/daniel/Science/C4/gladman.jl:123 overwritten at /home/daniel/Science/C4/gladman.jl:123.\r\nWARNING: Method definition draw_frame_chambers(Any, Any, Any) in module Main at \r\n/home/daniel/Science/C4/gladman.jl:155 overwritten at /home/daniel/Science/C4/gladman.jl:155.\r\nWARNING: Method definition draw_delta(Any, Any, Any) in module Main at \r\n/home/daniel/Science/C4/gladman.jl:187 overwritten at /home/daniel/Science/C4/gladman.jl:187.\r\nWARNING: Method definition final_orbits() in module Main at /home/daniel/Science/C4/gladman.jl:196\r\n overwritten at /home/daniel/Science/C4/gladman.jl:196.\r\nWARNING: Method definition old_final_orbits() in module Main at \r\n/home/daniel/Science/C4/gladman.jl:221 overwritten at /home/daniel/Science/C4/gladman.jl:221.\r\nWARNING: Method definition f(Any) in module Main at /home/daniel/Science/C4/hill.jl:24 overwritten\r\n at /home/daniel/Science/C4/hill.jl:49.\r\nWARNING: Method definition df(Any) in module Main at /home/daniel/Science/C4/hill.jl:25 overwritten\r\n at /home/daniel/Science/C4/hill.jl:50.\r\nWARNING: Method definition hill_limit(Any, Any, Any, Any, Any, Any) in module Main at\r\n /home/daniel/Science/C4/hill.jl:7 overwritten at /home/daniel/Science/C4/hill.jl:7.\r\nWARNING: Method definition gladman_limit(Any, Any, Any) in module Main at \r\n/home/daniel/Science/C4/hill.jl:81 overwritten at /home/daniel/Science/C4/hill.jl:81.\r\nWARNING: Method definition chambers_limit(Any, Any, Any) in module Main at \r\n/home/daniel/Science/C4/hill.jl:83 overwritten at /home/daniel/Science/C4/hill.jl:83.\r\nWARNING: Method definition Rh_plot(Any, Any) in module Main at /home/daniel/Science/C4/hill.jl:88\r\n overwritten at /home/daniel/Science/C4/hill.jl:88.\r\nWARNING: Method definition alpha_plot(Any, Any) in module Main at /home/daniel/Science/C4/hill.jl:99\r\n overwritten at /home/daniel/Science/C4/hill.jl:99.\r\nWARNING: Method definition test_hill() in module Main at /home/daniel/Science/C4/hill.jl:108\r\n overwritten at /home/daniel/Science/C4/hill.jl:108.\r\nWARNING: Method definition test_hill3() in module Main at /home/daniel/Science/C4/hill.jl:168\r\n overwritten at /home/daniel/Science/C4/hill.jl:168.\r\nWARNING: Method definition test_hill2() in module Main at /home/daniel/Science/C4/hill.jl:245\r\n overwritten at /home/daniel/Science/C4/hill.jl:245.\r\nWARNING: Method definition saveplot(Any) in module Main at /home/daniel/Science/C4/misc.jl:6\r\n overwritten at /home/daniel/Science/C4/misc.jl:6.\r\nWARNING: Method definition theilsen(AbstractArray, AbstractArray) in module Main at\r\n /home/daniel/Science/C4/misc.jl:14 overwritten at /home/daniel/Science/C4/misc.jl:14.\r\nWARNING: replacing docs for 'theilsen :: Tuple{AbstractArray,AbstractArray}' in module 'Main'.\r\nWARNING: Method definition summarize_runs() in module Main at /home/daniel/Science/C4/misc.jl:38\r\n overwritten at /home/daniel/Science/C4/misc.jl:38.\r\nWARNING: replacing docs for 'summarize_runs :: Tuple{}' in module 'Main'.\r\nWARNING: Method definition plot_2D_kde(Any, Any, Any, Any) in module Main at\r\n /home/daniel/Science/C4/misc.jl:89 overwritten at /home/daniel/Science/C4/misc.jl:89.\r\nWARNING: replacing docs for 'plot_2D_kde :: Tuple{Any,Any,Any,Any}' in module 'Main'.\r\nWARNING: Method definition generate_synthetic_pop(Any, Any) in module Main at \r\n/home/daniel/Science/C4/misc.jl:112 overwritten at /home/daniel/Science/C4/misc.jl:112.\r\nWARNING: Method definition generate_synthetic_pop(Any, Any, Any) in module Main at \r\n/home/daniel/Science/C4/misc.jl:112 overwritten at /home/daniel/Science/C4/misc.jl:112.\r\nWARNING: replacing docs for 'generate_synthetic_pop :: Union{Tuple{Any,Any,Any},Tuple{Any,Any}}'\r\n in module 'Main'.\r\nWARNING: Method definition generate_everything(DataFrames.DataFrame, Base.Dict) in module \r\nMain at /home/daniel/Science/C4/misc.jl:213 overwritten at /home/daniel/Science/C4/misc.jl:213.\r\nWARNING: Method definition generate_everything(DataFrames.DataFrame, Base.Dict, Bool) in \r\nmodule Main at /home/daniel/Science/C4/misc.jl:213 overwritten at \r\n/home/daniel/Science/C4/misc.jl:213.\r\nWARNING: Method definition plot_2D_obs(Any, Any, Any, Any) in module Main at \r\n/home/daniel/Science/C4/misc.jl:254 overwritten at /home/daniel/Science/C4/misc.jl:254.\r\nWARNING: Method definition plot_2D_imf(Any, Any, Any, Any) in module Main at \r\n/home/daniel/Science/C4/misc.jl:264 overwritten at /home/daniel/Science/C4/misc.jl:264.\r\nWARNING: Method definition plot_1D_kde(DataFrames.DataFrame, Base.Dict) in module Main \r\nat /home/daniel/Science/C4/misc.jl:274 overwritten at /home/daniel/Science/C4/misc.jl:274.\r\nWARNING: Method definition plot_1D_kde(DataFrames.DataFrame, Base.Dict, Bool) in module\r\n Main at /home/daniel/Science/C4/misc.jl:274 overwritten at /home/daniel/Science/C4/misc.jl:274.\r\nWARNING: B.q01D+32/23 -- expected 4 completions; got 5\r\nWARNING: B.q01D+32/26 -- expected 4 completions; got 5\r\nWARNING: B.q01D+32/27 -- expected 4 completions; got 5\r\nWARNING: B.q01D+32/29 -- expected 4 completions; got 5\r\nWARNING: B.q02D+34/14 is green but needs G*.end\r\n```\r\n\r\nNow all the legitimate warnings from my code are buried in a sea of useless warnings telling me that I overwrote a function again. Not only is this irritating, but I also think that it makes no sense in a functional language like Julia, where functions are just variables. Julia doesn't warn me every time that I change the value of a variable, right? Because that would be silly and annoying. But Julia functions are variables and if I define them in the form of a variable assignment, like `myadd = x,y -> x+y` Julia doesn't complain. So Julia is also being inconsistent in that some function redefinitions raise errors but others don't.\r\n\r\nThere is also no precedent that I know of for this kind of behaviour. In Python, when you modify a file and \"import\" the file again, you don't get a sea of warnings for every single function defined in that file. Ditto for Perl and the other high level languages that I can think of.\r\n\r\nI would like to request that the old behaviour be restored. The new behaviour doesn't add anything of value and it creates a lot of hassle and frustration. Failing at that, I would like to at least have a setting that I can put my ~/.juliarc.jl file to turn off all these warnings."},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/250473156","html_url":"https://github.com/JuliaLang/julia/issues/18725#issuecomment-250473156","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/18725","id":250473156,"user":{"login":"LeoK987","id":6257601,"avatar_url":"https://avatars.githubusercontent.com/u/6257601?v=3","gravatar_id":"","url":"https://api.github.com/users/LeoK987","html_url":"https://github.com/LeoK987","followers_url":"https://api.github.com/users/LeoK987/followers","following_url":"https://api.github.com/users/LeoK987/following{/other_user}","gists_url":"https://api.github.com/users/LeoK987/gists{/gist_id}","starred_url":"https://api.github.com/users/LeoK987/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LeoK987/subscriptions","organizations_url":"https://api.github.com/users/LeoK987/orgs","repos_url":"https://api.github.com/users/LeoK987/repos","events_url":"https://api.github.com/users/LeoK987/events{/privacy}","received_events_url":"https://api.github.com/users/LeoK987/received_events","type":"User","site_admin":false},"created_at":"2016-09-29T13:56:49Z","updated_at":"2016-09-29T13:56:49Z","body":"Other people have said a lot about this annoying feature.  One thing I want to add is that no one would find this feature useful when he is repeatedly bombarded with hundreds of the warning messages flashing by the terminal.  No Julia programmer is a robot at the moment."}}
{"actor":{"display_login":"LeoK987"}}