Skip to content
This repository has been archived by the owner on May 4, 2019. It is now read-only.

ambiguity warnings when used with Calendar.jl #115

Closed
WestleyArgentum opened this issue Aug 21, 2014 · 8 comments
Closed

ambiguity warnings when used with Calendar.jl #115

WestleyArgentum opened this issue Aug 21, 2014 · 8 comments

Comments

@WestleyArgentum
Copy link

See JuliaWeb/HttpCommon.jl#6

Probably this would be the best place to focus discussion?

Output:

julia> using DataArrays

julia> using Calendar
Warning: New definition
    +(AbstractArray{T1<:Union(AbstractCalendarDuration,CalendarTime),N},AbstractArray{T2<:Union(AbstractCalendarDuration,CalendarTime),N}) at operators.jl:376
is ambiguous with:
    +(DataArray{T,N},AbstractArray{T,N}) at /Users/westley/.julia/v0.3/DataArrays/src/operators.jl:326.
To fix, define
    +(DataArray{T1<:Union(AbstractCalendarDuration,CalendarTime),N},AbstractArray{T2<:Union(AbstractCalendarDuration,CalendarTime),N})
before the new definition.
Warning: New definition
    +(AbstractArray{T1<:Union(AbstractCalendarDuration,CalendarTime),N},AbstractArray{T2<:Union(AbstractCalendarDuration,CalendarTime),N}) at operators.jl:376
is ambiguous with:
    +(AbstractDataArray{T,N},AbstractArray{T,N}) at /Users/westley/.julia/v0.3/DataArrays/src/operators.jl:350.
To fix, define
    +(AbstractDataArray{T1<:Union(AbstractCalendarDuration,CalendarTime),N},AbstractArray{T2<:Union(AbstractCalendarDuration,CalendarTime),N})
before the new definition.
Warning: New definition
    +(AbstractArray{T1<:Union(AbstractCalendarDuration,CalendarTime),N},AbstractArray{T2<:Union(AbstractCalendarDuration,CalendarTime),N}) at operators.jl:376
is ambiguous with:
    +(AbstractArray{T,N},DataArray{T,N}) at /Users/westley/.julia/v0.3/DataArrays/src/operators.jl:326.
To fix, define
    +(AbstractArray{T1<:Union(AbstractCalendarDuration,CalendarTime),N},DataArray{T2<:Union(AbstractCalendarDuration,CalendarTime),N})
before the new definition.
Warning: New definition
    +(AbstractArray{T1<:Union(AbstractCalendarDuration,CalendarTime),N},AbstractArray{T2<:Union(AbstractCalendarDuration,CalendarTime),N}) at operators.jl:376
is ambiguous with:
    +(AbstractArray{T,N},AbstractDataArray{T,N}) at /Users/westley/.julia/v0.3/DataArrays/src/operators.jl:350.
To fix, define
    +(AbstractArray{T1<:Union(AbstractCalendarDuration,CalendarTime),N},AbstractDataArray{T2<:Union(AbstractCalendarDuration,CalendarTime),N})
before the new definition.
Warning: New definition
    -(AbstractArray{T1<:Union(AbstractCalendarDuration,CalendarTime),N},AbstractArray{T2<:Union(AbstractCalendarDuration,CalendarTime),N}) at operators.jl:376
is ambiguous with:
    -(DataArray{T,N},AbstractArray{T,N}) at /Users/westley/.julia/v0.3/DataArrays/src/operators.jl:326.
To fix, define
    -(DataArray{T1<:Union(AbstractCalendarDuration,CalendarTime),N},AbstractArray{T2<:Union(AbstractCalendarDuration,CalendarTime),N})
before the new definition.
Warning: New definition
    -(AbstractArray{T1<:Union(AbstractCalendarDuration,CalendarTime),N},AbstractArray{T2<:Union(AbstractCalendarDuration,CalendarTime),N}) at operators.jl:376
is ambiguous with:
    -(AbstractArray{T,N},DataArray{T,N}) at /Users/westley/.julia/v0.3/DataArrays/src/operators.jl:326.
To fix, define
    -(AbstractArray{T1<:Union(AbstractCalendarDuration,CalendarTime),N},DataArray{T2<:Union(AbstractCalendarDuration,CalendarTime),N})
before the new definition.
Warning: New definition
    -(AbstractArray{T1<:Union(AbstractCalendarDuration,CalendarTime),N},AbstractArray{T2<:Union(AbstractCalendarDuration,CalendarTime),N}) at operators.jl:376
is ambiguous with:
    -(AbstractDataArray{T,N},AbstractArray{T,N}) at /Users/westley/.julia/v0.3/DataArrays/src/operators.jl:350.
To fix, define
    -(AbstractDataArray{T1<:Union(AbstractCalendarDuration,CalendarTime),N},AbstractArray{T2<:Union(AbstractCalendarDuration,CalendarTime),N})
before the new definition.
Warning: New definition
    -(AbstractArray{T1<:Union(AbstractCalendarDuration,CalendarTime),N},AbstractArray{T2<:Union(AbstractCalendarDuration,CalendarTime),N}) at operators.jl:376
is ambiguous with:
    -(AbstractArray{T,N},AbstractDataArray{T,N}) at /Users/westley/.julia/v0.3/DataArrays/src/operators.jl:350.
To fix, define
    -(AbstractArray{T1<:Union(AbstractCalendarDuration,CalendarTime),N},AbstractDataArray{T2<:Union(AbstractCalendarDuration,CalendarTime),N})
before the new definition.
Warning: New definition
    -(AbstractArray{T1<:CalendarTime,N},AbstractArray{T2<:CalendarTime,N}) at operators.jl:376
is ambiguous with:
    -(DataArray{T,N},AbstractArray{T,N}) at /Users/westley/.julia/v0.3/DataArrays/src/operators.jl:326.
To fix, define
    -(DataArray{T1<:CalendarTime,N},AbstractArray{T2<:CalendarTime,N})
before the new definition.
Warning: New definition
    -(AbstractArray{T1<:CalendarTime,N},AbstractArray{T2<:CalendarTime,N}) at operators.jl:376
is ambiguous with:
    -(AbstractArray{T,N},DataArray{T,N}) at /Users/westley/.julia/v0.3/DataArrays/src/operators.jl:326.
To fix, define
    -(AbstractArray{T1<:CalendarTime,N},DataArray{T2<:CalendarTime,N})
before the new definition.
Warning: New definition
    -(AbstractArray{T1<:CalendarTime,N},AbstractArray{T2<:CalendarTime,N}) at operators.jl:376
is ambiguous with:
    -(AbstractDataArray{T,N},AbstractArray{T,N}) at /Users/westley/.julia/v0.3/DataArrays/src/operators.jl:350.
To fix, define
    -(AbstractDataArray{T1<:CalendarTime,N},AbstractArray{T2<:CalendarTime,N})
before the new definition.
Warning: New definition
    -(AbstractArray{T1<:CalendarTime,N},AbstractArray{T2<:CalendarTime,N}) at operators.jl:376
is ambiguous with:
    -(AbstractArray{T,N},AbstractDataArray{T,N}) at /Users/westley/.julia/v0.3/DataArrays/src/operators.jl:350.
To fix, define
    -(AbstractArray{T1<:CalendarTime,N},AbstractDataArray{T2<:CalendarTime,N})
before the new definition.
@simonster
Copy link
Member

See the discussion in JuliaLang/julia#270, particularly @JeffBezanson's last two comments, although the actual issue there is kind of different. Would be fixed by JuliaLang/julia#6190.

@johnmyleswhite
Copy link
Member

One question I have is whether HttpCommon really needs to use DataArrays. If that's a minor feature, removing it seems like the quickest fix.

@WestleyArgentum
Copy link
Author

@simonster Ah! Thanks!

@johnmyleswhite HttpCommon uses Calendar - I think a lot of people end up pulling in DataFrames while using HttpCommon to do scraping, etc. Not sure if HttpCommon really needs Calendar or not, that might be worth investigating

@johnmyleswhite
Copy link
Member

Definitely worth migrating from Calendar to Dates

@WestleyArgentum
Copy link
Author

Looks like that wouldn't be too much work - poking now, unless someone is already on it

@WestleyArgentum
Copy link
Author

Craziness happened yesterday, but I submitted a tentative PR just now - needs more testing but fixes the ambiguity warnings and works well so far!

@WestleyArgentum
Copy link
Author

New HttpCommon with migration to Dates.jl is tagged! JuliaLang/METADATA.jl#1310

@johnmyleswhite
Copy link
Member

Thanks for solving this on the other end!

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

No branches or pull requests

3 participants