-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix warnings #143
Fix warnings #143
Conversation
This PR fixes the following warning ```julia [ Info: Precompiling ForwardDiff2 [994df76e-a4c1-5e1f-bd5c-23b9b5303d4f] WARNING: Method definition rrule(typeof(Base.sum), AbstractArray{#s695, N} where N where #s695<:Real) in module ChainRules at /home/scheme/.julia/dev/ChainRules/src/rulesets/Base/mapreduce.jl:61 overwritten at /home/scheme/.julia/dev/ChainRules/src/rulesets/Base/mapreduce.jl:76. ** incremental compilation may be fatally broken for this module ** WARNING: Method definition rrule(typeof(Base.sum), AbstractArray{#s695, N} where N where #s695<:Real) in module ChainRules at /home/scheme/.julia/dev/ChainRules/src/rulesets/Base/mapreduce.jl:61 overwritten at /home/scheme/.julia/dev/ChainRules/src/rulesets/Base/mapreduce.jl:76. ** incremental compilation may be fatally broken for this module ** ```
```julia julia> using NaNMath, SpecialFunctions ┌ Warning: Error requiring NaNMath from ChainRules: │ LoadError: UndefVarError: SpecialFunctions not defined │ Stacktrace: │ [1] include at ./boot.jl:328 [inlined] │ [2] include_relative(::Module, ::String) at ./loading.jl:1105 │ [3] include at ./Base.jl:31 [inlined] │ [4] include(::String) at /home/scheme/.julia/dev/ChainRules/src/ChainRules.jl:1 │ [5] top-level scope at /home/scheme/.julia/dev/ChainRules/src/ChainRules.jl:45 │ [6] eval at ./boot.jl:330 [inlined] │ [7] eval at /home/scheme/.julia/dev/ChainRules/src/ChainRules.jl:1 [inlined] │ [8] (::ChainRules.var"#867#873")() at /home/scheme/.julia/packages/Requires/9Jse8/src/require.jl:67 │ [9] err(::ChainRules.var"#867#873", ::Module, ::String) at /home/scheme/.julia/packages/Requires/9Jse8/src/require.jl:38 │ [10] #866 at /home/scheme/.julia/packages/Requires/9Jse8/src/require.jl:66 [inlined] │ [11] withpath(::ChainRules.var"#866#872", ::String) at /home/scheme/.julia/packages/Requires/9Jse8/src/require.jl:28 │ [12] (::ChainRules.var"#865#871")() at /home/scheme/.julia/packages/Requires/9Jse8/src/require.jl:65 │ [13] #invokelatest#1 at ./essentials.jl:709 [inlined] │ [14] invokelatest at ./essentials.jl:708 [inlined] │ [15] #3 at /home/scheme/.julia/packages/Requires/9Jse8/src/require.jl:19 [inlined] │ [16] iterate at ./generator.jl:47 [inlined] │ [17] _collect(::Array{Function,1}, ::Base.Generator{Array{Function,1},Requires.var"#3#4"}, ::Base.EltypeUnknown, ::Base.HasShape{1}) at ./array.jl:635 │ [18] map at ./array.jl:564 [inlined] │ [19] loadpkg(::Base.PkgId) at /home/scheme/.julia/packages/Requires/9Jse8/src/require.jl:19 │ [20] #invokelatest#1 at ./essentials.jl:709 [inlined] │ [21] invokelatest at ./essentials.jl:708 [inlined] │ [22] require(::Base.PkgId) at ./loading.jl:925 │ [23] require(::Module, ::Symbol) at ./loading.jl:917 │ [24] eval(::Module, ::Any) at ./boot.jl:330 │ [25] eval_user_input(::Any, ::REPL.REPLBackend) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/REPL/src/REPL.jl:86 │ [26] run_backend(::REPL.REPLBackend) at /home/scheme/.julia/packages/Revise/S7mrl/src/Revise.jl:1057 │ [27] (::Revise.var"#85#87"{REPL.REPLBackend})() at ./task.jl:333 │ in expression starting at /home/scheme/.julia/dev/ChainRules/src/rulesets/packages/NaNMath.jl:4 └ @ Requires ~/.julia/packages/Requires/9Jse8/src/require.jl:40 ```
Is there a way to do this without moving like hundreds of lines directly into |
This is how it is done in JuliaDiffEq https://github.com/JuliaDiffEq/DiffEqBase.jl/blob/master/src/init.jl#L9-L175. I don't know what's bad about removing a few files. If anything, I think it is easier to deal with fewer files since you don't need to keep jumping around files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I strongly disagree that having this all in one file is better.
If I want to write or edit a rule for SpecialFunctions.jl, I expect to look in the SpecialFunctions file.
Not in the root file of the package
The people who know how to write the
This reverts commit 40382c6.
Fine... Seems like that the culprit is JuliaPackaging/Requires.jl#65 |
If this fixes the warning then this LGTM, squash it when you merge. |
This PR fixes the following warnings
and