-
Notifications
You must be signed in to change notification settings - Fork 40
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
Use IrrationalConstants as a dependency #121
Comments
This will be addressed by #118. |
I would assume that the issue can be avoided if LogExpFunctions is upper bounded to 0.2? |
Would you mind making a hotfix for this? It's quite annoying to get all these warnings |
I'm not sure how to fix this in StatsFuns other than adding a dependency on IrrationalConstants, as done in the PR linked above? Users can avoid the issue by just not loading IrrationalConstants or LogExpFunctions 0.3 together with StatsFuns (since StatsFuns does only support LogExpFunctions 0.2, the latter shouldn't actually be possible). |
So if I'm not mistaken, the problem are packages that incorrectly load both IrrationalConstants and StatsFuns which they should not have done. StatsFuns declares all dependencies correctly. |
julia> using Pkg; Pkg.activate(temp=true); Pkg.add("DiffEqBase")
Activating new environment at `/tmp/jl_YHumd5/Project.toml`
Updating registry at `~/.julia/registries/General`
Updating git-repo `https://github.com/JuliaRegistries/General`
Resolving package versions...
Updating `/tmp/jl_YHumd5/Project.toml`
[2b5f629d] + DiffEqBase v6.71.1
Updating `/tmp/jl_YHumd5/Manifest.toml`
[79e6a3ab] + Adapt v3.3.1
[4fba245c] + ArrayInterface v3.1.17
[d360d2e6] + ChainRulesCore v1.3.0
[fb6a15b2] + CloseOpenIntervals v0.1.1
[38540f10] + CommonSolve v0.2.0
[bbf7d656] + CommonSubexpressions v0.3.0
[34da2185] + Compat v3.32.0
[187b0558] + ConstructionBase v1.3.0
[754358af] + DEDataArrays v0.2.0
[9a962f9c] + DataAPI v1.7.0
[864edb3b] + DataStructures v0.18.10
[e2d170a0] + DataValueInterfaces v1.0.0
[2b5f629d] + DiffEqBase v6.71.1
[163ba53b] + DiffResults v1.0.3
[b552c78f] + DiffRules v1.2.1
[31c24e10] + Distributions v0.25.11
[ffbed154] + DocStringExtensions v0.8.5
[7034ab61] + FastBroadcast v0.1.8
[1a297f60] + FillArrays v0.12.1
[6a86dc24] + FiniteDiff v2.8.1
[f6369f11] + ForwardDiff v0.10.19
[069b7b12] + FunctionWrappers v1.1.2
[0e44f5e4] + Hwloc v2.0.0
[615f187c] + IfElse v0.1.0
[92d709cd] + IrrationalConstants v0.1.0
[42fd0dbc] + IterativeSolvers v0.9.1
[82899510] + IteratorInterfaceExtensions v1.0.0
[692b3bcd] + JLLWrappers v1.3.0
[2ee39098] + LabelledArrays v1.6.4
[2ab3a3ac] + LogExpFunctions v0.3.0
[bdcacae8] + LoopVectorization v0.12.63
[1914dd2f] + MacroTools v0.5.7
[d125e4d3] + ManualMemory v0.1.6
[e1d29d7a] + Missings v1.0.0
[46d2c3a1] + MuladdMacro v0.2.2
[77ba4419] + NaNMath v0.3.5
[8913a72c] + NonlinearSolve v0.3.9
[6fe1bfb0] + OffsetArrays v1.10.5
[bac558e1] + OrderedCollections v1.4.1
[90014a1f] + PDMats v0.11.1
[d96e819e] + Parameters v0.12.2
[f517fe37] + Polyester v0.3.8
[d236fae5] + PreallocationTools v0.1.0
[21216c6a] + Preferences v1.2.2
[1fd47b50] + QuadGK v2.4.1
[3cdcf5f2] + RecipesBase v1.1.1
[731186ca] + RecursiveArrayTools v2.17.0
[f2c3362d] + RecursiveFactorization v0.2.2
[189a3867] + Reexport v1.1.0
[ae029012] + Requires v1.1.3
[79098fc4] + Rmath v0.7.0
[476501e8] + SLEEFPirates v0.6.25
[0bca4576] + SciMLBase v1.18.4
[efcf1570] + Setfield v0.7.1
[a2af1166] + SortingAlgorithms v1.0.1
[276daf66] + SpecialFunctions v1.6.1
[aedffcd0] + Static v0.2.5
[90137ffa] + StaticArrays v1.2.12
[82ae8749] + StatsAPI v1.0.0
[2913bbd2] + StatsBase v0.33.9
[4c63d2b9] + StatsFuns v0.9.7
[7792a7ef] + StrideArraysCore v0.1.17
[3783bdb8] + TableTraits v1.0.1
[bd369af6] + Tables v1.5.0
[8290d209] + ThreadingUtilities v0.4.6
[a2a6695c] + TreeViews v0.3.0
[d5829a12] + TriangularSolve v0.1.2
[3a884ed6] + UnPack v1.0.2
[3d5dd08c] + VectorizationBase v0.20.33
[700de1a5] + ZygoteRules v0.2.1
[e33a78d0] + Hwloc_jll v2.5.0+0
[efe28fd5] + OpenSpecFun_jll v0.5.5+0
[f50d1b31] + Rmath_jll v0.3.0+0
[0dad84c5] + ArgTools
[56f22d72] + Artifacts
[2a0f44e3] + Base64
[ade2ca70] + Dates
[8bb1440f] + DelimitedFiles
[8ba89e20] + Distributed
[f43a241f] + Downloads
[9fa8497b] + Future
[b77e0a4c] + InteractiveUtils
[b27032c2] + LibCURL
[76f85450] + LibGit2
[8f399da3] + Libdl
[37e2e46d] + LinearAlgebra
[56ddb016] + Logging
[d6f4376e] + Markdown
[a63ad114] + Mmap
[ca575930] + NetworkOptions
[44cfe95a] + Pkg
[de0858da] + Printf
[3fa0cd96] + REPL
[9a3f8284] + Random
[ea8e919c] + SHA
[9e88b42a] + Serialization
[1a1011a3] + SharedArrays
[6462fe0b] + Sockets
[2f01184e] + SparseArrays
[10745b16] + Statistics
[4607b0f0] + SuiteSparse
[fa267f1f] + TOML
[a4e569a6] + Tar
[8dfed614] + Test
[cf7118a7] + UUIDs
[4ec0a83e] + Unicode
[e66e0078] + CompilerSupportLibraries_jll
[deac9b47] + LibCURL_jll
[29816b5a] + LibSSH2_jll
[c8ffd9c3] + MbedTLS_jll
[14a3606d] + MozillaCACerts_jll
[83775a58] + Zlib_jll
[8e850ede] + nghttp2_jll
[3f19e933] + p7zip_jll
julia> using DiffEqBase
[ Info: Precompiling DiffEqBase [2b5f629d-d688-5b77-993f-72d75c75574e]
WARNING: Method definition Type##kw(Any, Type{Base.MPFR.BigFloat}, Base.Irrational{:quartπ}) in module IrrationalConstants at irrationals.jl:180 overwritten in module StatsFuns on the same line (check for duplicate calls to `include`).
** incremental compilation may be fatally broken for this module **
WARNING: Method definition Type##kw(Any, Type{Base.MPFR.BigFloat}, Base.Irrational{:sqrt2}) in module IrrationalConstants at irrationals.jl:180 overwritten in module StatsFuns on the same line (check for duplicate calls to `include`).
** incremental compilation may be fatally broken for this module **
[...] DiffEqBase has neither StatsFuns nor IrrationalConstants as a direct dependency. |
DiffEqBase pulls in an old version of StatsFuns that did not depend on LogExpFunctions. Therefore you end up with LogExpFunctions 0.3 even though the latest StatsFuns release explicitly declares to be compatible only with LogExpFunctions [0.2.1, 0.3). Probably LogExpFunctions 0.3 (and hence IrrationalConstants) are pulled in by SpecialFunctions. StatsFuns is a dependency of, e.g., Distributions. You should be able to fix it by using the latest StatsFuns version explicitly. |
@ranocha: I cannot replicate the error above on 1.7 ( |
I'm using Julia version 1.6.2 (2021-07-14) with (@v1.6) pkg> registry status
Registry Status
[23338594] General (https://github.com/JuliaRegistries/General.git) Are you using the General registry with package servers so that some package versions might be slightly older? |
Nope, same status here too, also on 1.7. (@v1.7) pkg> registry status
Registry Status
[23338594] General |
Maybe the package resolver is not completely deterministic (different OS?) and one does not always end up with LogExpFunctions 0.3? |
The |
I get about 5000 lines (!) of warnings of the type as mentioned above WARNING: Method definition (::Type{Float32})(Base.Irrational{:halfπ}) in module IrrationalConstants at irrationals.jl:192 overwritten in module StatsFuns on the same line (check for duplicate calls to `include`).
** incremental compilation may be fatally broken for this module **
WARNING: Method definition (::Type{Float32})(Base.Irrational{:fourπ}) in module IrrationalConstants at irrationals.jl:192 overwritten in module StatsFuns on the same line (check for duplicate calls to `include`).
** incremental compilation may be fatally broken for this module I tried with Julia 1.6.2, 1.7.0-beta.3 under Windows 10 and have the following packages in the environment [0c46a032] DifferentialEquations v6.19.0
[31c24e10] Distributions v0.25.11
[497a8b3b] DoubleFloats v1.1.23
[eff96d63] Measurements v2.6.0
[0987c9cc] MonteCarloMeasurements v0.10.4
[295af30f] Revise v3.1.19
[90137ffa] StaticArrays v1.2.12
[1986cc42] Unitful v1.9.0 Since my own packages are also using the packages above, it seems, incremental compilation is broken everywhere and Revise does no longer work, which means that package development is largely hindered. Can someone give advice what to do. Addendum: For whatever reason, now Revise does work for my packages. So, the "only" annoyance are the warning messages (hopefully). |
Maybe JuliaMath/SpecialFunctions.jl#340 should be reverted. |
#122 should make StatsFuns compatible with the move to LogExpFunctions 0.3/IrrationalConstants in SpecialFunctions. |
This is still a problem with Julia 1.8.1 on MacOS ARM. I don't explicitly use Base.Irrational but it must be automatically included by nearly every floating point operation. I do use StatFun. A year later and no fix? |
I assume you use a quite old version of StatsFuns. This issue was fixed a year ago and I can't reproduce it with StatsFuns >= 0.9.9. |
Looks like 0.9.7 in my Julia 1.8.1 manifest. But, I don’t add it directly. Seems to be a dependency of Distributions and Makie.
But, my versions of both Distributions and Makie are old.
* Makie in manifest = 0.16.6; latest = 0.17.134
* Distributions in manifest = 0.25.45; latest = 0.25.71
Seems like a problem with the Manifest for the MacOS ARM build of Julia because the same thing happened to DataFrames—including a version before their 1.0.0!
So, apologies. Definitely not yours! Something funky with the Julia 1.8.1 distro.
From: David Widmann ***@***.***>
Reply-To: "JuliaStats/StatsFuns.jl" ***@***.***>
Date: Thursday, September 15, 2022 at 1:02 PM
To: "JuliaStats/StatsFuns.jl" ***@***.***>
Cc: Lewis Levin ***@***.***>, Comment ***@***.***>
Subject: Re: [JuliaStats/StatsFuns.jl] Use IrrationalConstants as a dependency (#121)
I assume you use a quite old version of StatsFuns. This issue was fixed a year ago and I can't reproduce it with StatsFuns >= 0.9.9.
—
Reply to this email directly, view it on GitHub<#121 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAIYWLO43GI63H4FDKT7HOLV6N6DRANCNFSM5B65QQFQ>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Turns out one must run add by version number or up multiple times, quitting Julia after each attempt. Gradually, package conflicts seem to work out.
Now I have StatsFuns 1.0.1. Whether that’s the latest or not its >= 0.9.9.
So, no more warnings. This repeat invocation of up or add an explicit version several times also resolved DataFrames and Plots.
Mark resolved (wasn’t a real issue to begin with).
Thanks.
From: David Widmann ***@***.***>
Reply-To: "JuliaStats/StatsFuns.jl" ***@***.***>
Date: Thursday, September 15, 2022 at 1:02 PM
To: "JuliaStats/StatsFuns.jl" ***@***.***>
Cc: Lewis Levin ***@***.***>, Comment ***@***.***>
Subject: Re: [JuliaStats/StatsFuns.jl] Use IrrationalConstants as a dependency (#121)
I assume you use a quite old version of StatsFuns. This issue was fixed a year ago and I can't reproduce it with StatsFuns >= 0.9.9.
—
Reply to this email directly, view it on GitHub<#121 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAIYWLO43GI63H4FDKT7HOLV6N6DRANCNFSM5B65QQFQ>.
You are receiving this because you commented.Message ID: ***@***.***>
|
It seems that several packages have added
IrrationalConstants
as a dependency which is colliding with packages that useStatsFuns
. Namely, the addition ofLogExpFunctions
to ForwardDiff is creating a lot of methods overwrite warnings:The text was updated successfully, but these errors were encountered: