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

Ambiguous definitions with DataArrays on v0.4 #563

Closed
anriseth opened this issue Sep 1, 2015 · 13 comments
Closed

Ambiguous definitions with DataArrays on v0.4 #563

anriseth opened this issue Sep 1, 2015 · 13 comments

Comments

@anriseth
Copy link
Contributor

anriseth commented Sep 1, 2015

With Julia 0.4..., DataArrays 0.2.18 and JuMP 0.10.0:

julia> using DataArrays, JuMP
WARNING: New definition 
    .+(AbstractArray{#S<:Union{JuMP.GenericQuadExpr{Float64, JuMP.Variable}, JuMP.GenericNormExpr{2, Float64, JuMP.Variable}, JuMP.AbstractJuMPScalar, JuMP.GenericNorm{P<:Any, Float64, JuMP.Variable}, JuMP.GenericAffExpr}, #N<:Any}, AbstractArray{#T<:Number, #N<:Any}) at /home/asbjorn/.julia/v0.4/JuMP/src/operators.jl:565
is ambiguous with: 
    .+(Union{DataArrays.PooledDataArray, DataArrays.DataArray}, AbstractArray...) at /home/asbjorn/.julia/v0.4/DataArrays/src/broadcast.jl:284.
To fix, define 
    .+(Union{DataArrays.DataArray{#S<:Union{JuMP.GenericQuadExpr{Float64, JuMP.Variable}, JuMP.GenericNormExpr{2, Float64, JuMP.Variable}, JuMP.AbstractJuMPScalar, JuMP.GenericNorm{P<:Any, Float64, JuMP.Variable}, JuMP.GenericAffExpr}, N<:Any}, DataArrays.PooledDataArray{#S<:Union{JuMP.GenericQuadExpr{Float64, JuMP.Variable}, JuMP.GenericNormExpr{2, Float64, JuMP.Variable}, JuMP.AbstractJuMPScalar, JuMP.GenericNorm{P<:Any, Float64, JuMP.Variable}, JuMP.GenericAffExpr}, R<:Integer, N<:Any}}, AbstractArray{#T<:Number, N<:Any})
before the new definition.

etc.

I don't know if this should be fixed in JuMP or DataArrays?

@anriseth anriseth changed the title Ambiguous definitions with DataArray on v0.4 Ambiguous definitions with DataArrays on v0.4 Sep 1, 2015
@joehuchette
Copy link
Contributor

Hmm, that's no good. It's likely that both methods are overly broad. Thanks for reporting, I should have an easy fix.

@anriseth
Copy link
Contributor Author

anriseth commented Sep 1, 2015

Great. Just to clarify, there are more of these conflict warnings that
I've snipped out. I assume you can reproduce the error to see them all (I'm
not by a computer with Julia atm ...)

On Tue, 1 Sep 2015 at 17:36 Joey Huchette notifications@github.com wrote:

Hmm, that's no good. It's likely that both methods are overly broad.
Thanks for reporting, I should have an easy fix.


Reply to this email directly or view it on GitHub
#563 (comment).

@IainNZ
Copy link
Collaborator

IainNZ commented Sep 1, 2015

I get these on Julia 0.3 on JuMP master:

IAINMAC:JuMP idunning$ jl test/runtests.jl
Warning: New definition
    .*(Union(SparseMatrixCSC{S<:Union(GenericQuadExpr{Float64,Variable},GenericAffExpr{CoefType,VarType},GenericNorm{P,Float64,Variable},GenericNormExpr{2,Float64,Variable},AbstractJuMPScalar),Ti<:Integer},Array{S<:Union(GenericQuadExpr{Float64,Variable},GenericAffExpr{CoefType,VarType},GenericNorm{P,Float64,Variable},GenericNormExpr{2,Float64,Variable},AbstractJuMPScalar),N}),Union(SparseMatrixCSC{T<:Number,Ti<:Integer},Array{T<:Number,N})) at /Users/idunning/.julia/v0.3/JuMP/src/operators.jl:568
is ambiguous with:
    .*(SparseMatrixCSC{Tv,Ti},SparseMatrixCSC{Tv,Ti}) at sparse/sparsematrix.jl:554.
To fix, define
    .*(SparseMatrixCSC{_<:Union(GenericQuadExpr{Float64,Variable},GenericAffExpr{CoefType,VarType},GenericNorm{P,Float64,Variable},GenericNormExpr{2,Float64,Variable},AbstractJuMPScalar),_<:Integer},SparseMatrixCSC{_<:Number,_<:Integer})
before the new definition.
Warning: New definition
    .*(Union(SparseMatrixCSC{S<:Union(GenericQuadExpr{Float64,Variable},GenericAffExpr{CoefType,VarType},GenericNorm{P,Float64,Variable},GenericNormExpr{2,Float64,Variable},AbstractJuMPScalar),Ti<:Integer},Array{S<:Union(GenericQuadExpr{Float64,Variable},GenericAffExpr{CoefType,VarType},GenericNorm{P,Float64,Variable},GenericNormExpr{2,Float64,Variable},AbstractJuMPScalar),N}),Union(Array{T<:Union(GenericQuadExpr{Float64,Variable},GenericAffExpr{CoefType,VarType},GenericNorm{P,Float64,Variable},GenericNormExpr{2,Float64,Variable},AbstractJuMPScalar),N},SparseMatrixCSC{T<:Union(GenericQuadExpr{Float64,Variable},GenericAffExpr{CoefType,VarType},GenericNorm{P,Float64,Variable},GenericNormExpr{2,Float64,Variable},AbstractJuMPScalar),Ti<:Integer})) at /Users/idunning/.julia/v0.3/JuMP/src/operators.jl:579
is ambiguous with:
    .*(SparseMatrixCSC{Tv,Ti},SparseMatrixCSC{Tv,Ti}) at sparse/sparsematrix.jl:554.
To fix, define
    .*(SparseMatrixCSC{_<:Union(GenericQuadExpr{Float64,Variable},GenericAffExpr{CoefType,VarType},GenericNorm{P,Float64,Variable},GenericNormExpr{2,Float64,Variable},AbstractJuMPScalar),_<:Integer},SparseMatrixCSC{_<:Union(GenericQuadExpr{Float64,Variable},GenericAffExpr{CoefType,VarType},GenericNorm{P,Float64,Variable},GenericNormExpr{2,Float64,Variable},AbstractJuMPScalar),_<:Integer})
before the new definition.
Warning: New definition
    .*(Union(Array{S<:Number,N},SparseMatrixCSC{S<:Number,Ti<:Integer}),Union(Array{T<:Union(GenericQuadExpr{Float64,Variable},GenericAffExpr{CoefType,VarType},GenericNorm{P,Float64,Variable},GenericNormExpr{2,Float64,Variable},AbstractJuMPScalar),N},SparseMatrixCSC{T<:Union(GenericQuadExpr{Float64,Variable},GenericAffExpr{CoefType,VarType},GenericNorm{P,Float64,Variable},GenericNormExpr{2,Float64,Variable},AbstractJuMPScalar),Ti<:Integer})) at /Users/idunning/.julia/v0.3/JuMP/src/operators.jl:587
is ambiguous with:
    .*(SparseMatrixCSC{Tv,Ti},SparseMatrixCSC{Tv,Ti}) at sparse/sparsematrix.jl:554.
To fix, define
    .*(SparseMatrixCSC{_<:Number,_<:Integer},SparseMatrixCSC{_<:Union(GenericQuadExpr{Float64,Variable},GenericAffExpr{CoefType,VarType},GenericNorm{P,Float64,Variable},GenericNormExpr{2,Float64,Variable},AbstractJuMPScalar),_<:Integer})
before the new definition.

@joehuchette
Copy link
Contributor

:(

@joehuchette
Copy link
Contributor

e312885

@IainNZ
Copy link
Collaborator

IainNZ commented Sep 2, 2015

I'm still getting it, is that expected? Can you reproduce this?

@joehuchette
Copy link
Contributor

I fixed it, then broke it, then fixed it again in d791cf2

@IainNZ
Copy link
Collaborator

IainNZ commented Sep 2, 2015

Yep seems good now

@mlubin
Copy link
Member

mlubin commented Sep 2, 2015

If it's resolved we should tag 0.10.1.

@joehuchette
Copy link
Contributor

Sure, or we could leave it for a day or two and see if anything else shakes out.

@mlubin
Copy link
Member

mlubin commented Sep 2, 2015

Okay with me

@mlubin
Copy link
Member

mlubin commented Sep 2, 2015

Good thing we waited. JuliaLang/julia@2984945 just broke JuMP on 0.4

@mlubin
Copy link
Member

mlubin commented Sep 4, 2015

Should be fixed on 0.10.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants