Skip to content
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

Huge number of overwrite warnings on Julia 0.4 #26

Closed
tlnagy opened this issue Aug 8, 2016 · 5 comments · Fixed by #27
Closed

Huge number of overwrite warnings on Julia 0.4 #26

tlnagy opened this issue Aug 8, 2016 · 5 comments · Fixed by #27

Comments

@tlnagy
Copy link
Contributor

tlnagy commented Aug 8, 2016

Just loading the Combinatorics package on 0.4 throws a huge number of warnings, which leads to pretty poor user experience:

julia> using Combinatorics
WARNING: Method definition levicivita(AbstractArray{#T<:Integer, 1}) in module Base at combinatorics.jl:611 overwritten in module Combinatorics at /Users/tamasnagy/.julia/v0.4/Combinatorics/src/permutations.jl:188.
WARNING: Method definition partitions(Integer) in module Base at combinatorics.jl:252 overwritten in module Combinatorics at /Users/tamasnagy/.julia/v0.4/Combinatorics/src/partitions.jl:26.
WARNING: Method definition partitions(Integer, Integer) in module Base at combinatorics.jl:318 overwritten in module Combinatorics at /Users/tamasnagy/.julia/v0.4/Combinatorics/src/partitions.jl:93.
WARNING: Method definition partitions(AbstractArray{T<:Any, 1}) in module Base at combinatorics.jl:380 overwritten in module Combinatorics at /Users/tamasnagy/.julia/v0.4/Combinatorics/src/partitions.jl:158.
WARNING: Method definition partitions(AbstractArray{T<:Any, 1}, Int64) in module Base at combinatorics.jl:447 overwritten in module Combinatorics at /Users/tamasnagy/.julia/v0.4/Combinatorics/src/partitions.jl:228.
WARNING: Method definition permutations(Any) in module Base at combinatorics.jl:219 overwritten in module Combinatorics at /Users/tamasnagy/.julia/v0.4/Combinatorics/src/permutations.jl:24.
WARNING: Method definition nthperm!(AbstractArray{T<:Any, 1}, Integer) in module Base at combinatorics.jl:70 overwritten in module Combinatorics at /Users/tamasnagy/.julia/v0.4/Combinatorics/src/permutations.jl:136.
WARNING: Method definition prevprod(Array{Int64, 1}, Any) in module Base at combinatorics.jl:565 overwritten in module Combinatorics at /Users/tamasnagy/.julia/v0.4/Combinatorics/src/partitions.jl:354.
WARNING: Method definition combinations(Any, Integer) in module Base at combinatorics.jl:182 overwritten in module Combinatorics at /Users/tamasnagy/.julia/v0.4/Combinatorics/src/combinations.jl:42.
WARNING: Method definition nthperm(AbstractArray{#T<:Integer, 1}) in module Base at combinatorics.jl:92 overwritten in module Combinatorics at /Users/tamasnagy/.julia/v0.4/Combinatorics/src/permutations.jl:161.
WARNING: Method definition nthperm(AbstractArray{T<:Any, 1}, Integer) in module Base at combinatorics.jl:89 overwritten in module Combinatorics at /Users/tamasnagy/.julia/v0.4/Combinatorics/src/permutations.jl:157.
WARNING: Method definition factorial(#T<:Integer, #T<:Integer) in module Base at combinatorics.jl:56 overwritten in module Combinatorics at /Users/tamasnagy/.julia/v0.4/Combinatorics/src/factorials.jl:18.
WARNING: Method definition factorial(Integer, Integer) in module Base at combinatorics.jl:66 overwritten in module Combinatorics at /Users/tamasnagy/.julia/v0.4/Combinatorics/src/factorials.jl:28.
WARNING: Method definition parity(AbstractArray{#T<:Integer, 1}) in module Base at combinatorics.jl:642 overwritten in module Combinatorics at /Users/tamasnagy/.julia/v0.4/Combinatorics/src/permutations.jl:221.

I know that this was fixed in Base by JuliaLang/julia#16125, but 0.4 is still the official release.

@KristofferC
Copy link
Member

I don't think anyone is going to put work into this when a new release that fixes this is not far away.

@mbauman
Copy link

mbauman commented Aug 8, 2016

A version check here https://github.com/JuliaLang/Combinatorics.jl/blob/44d815f1e2800d308407af70ea2195bfe135be81/src/Combinatorics.jl#L12 would probably make sense. You can use the workflow in Compat.jl to find the appropriate version number.

@KristofferC
Copy link
Member

Oh, I didn't even notice these were not ambiguity but method overwrites. Yeah, then this should not be hard to fix like @mbauman says.

@tlnagy tlnagy changed the title Huge number of ambiguity warnings on Julia 0.4 Huge number of overwritten warnings on Julia 0.4 Aug 8, 2016
@tlnagy
Copy link
Contributor Author

tlnagy commented Aug 8, 2016

Oh yeah, they are overwrite warnings. My bad for using the wrong terminology. That fix seems easy enough to implement.

@tlnagy
Copy link
Contributor Author

tlnagy commented Aug 8, 2016

Based on @mbauman's suggestion, I made a quick PR fixing this: #27. There are still overwrite warnings for factorial, but my impression was that those should be there even on v0.4.

@tlnagy tlnagy changed the title Huge number of overwritten warnings on Julia 0.4 Huge number of overwrite warnings on Julia 0.4 Aug 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants