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

Method ambiguities reported by Aqua #245

Open
prbzrg opened this issue Dec 27, 2023 · 0 comments
Open

Method ambiguities reported by Aqua #245

prbzrg opened this issue Dec 27, 2023 · 0 comments

Comments

@prbzrg
Copy link

prbzrg commented Dec 27, 2023

In Julia v1.10, I used Aqua to detect method ambiguities in my package impICNF/ContinuousNormalizingFlows.jl#356 and some of its report were related to this package:

Ambiguity #8
==(a::ReverseDiff.TrackedReal, b::Real) @ ReverseDiff ~/.julia/packages/ReverseDiff/UJhiD/src/derivatives/scalars.jl:43
==(x::Real, y::AbstractIrrational) @ Base irrationals.jl:90

Possible fix, define
  ==(::ReverseDiff.TrackedReal, ::AbstractIrrational)

Ambiguity #14
==(a::Real, b::ReverseDiff.TrackedReal) @ ReverseDiff ~/.julia/packages/ReverseDiff/UJhiD/src/derivatives/scalars.jl:42
==(x::AbstractIrrational, y::Real) @ Base irrationals.jl:89

Possible fix, define
  ==(::AbstractIrrational, ::ReverseDiff.TrackedReal)

Ambiguity #15
Base.Broadcast.BroadcastStyle(::ReverseDiff.TrackedStyle, b::Base.Broadcast.BroadcastStyle) @ ReverseDiff ~/.julia/packages/ReverseDiff/UJhiD/src/derivatives/broadcast.jl:38
Base.Broadcast.BroadcastStyle(::S, ::Base.Broadcast.Unknown) where S<:BroadcastStyle @ Base.Broadcast broadcast.jl:133

Possible fix, define
  Base.Broadcast.BroadcastStyle(::ReverseDiff.TrackedStyle, ::Base.Broadcast.Unknown)

Ambiguity #36
ReverseDiff.TrackedReal{V, D, O}(value) where {V, D, O} @ ReverseDiff ~/.julia/packages/ReverseDiff/UJhiD/src/tracked.jl:56
(::Type{T})(x::T) where T<:Number @ Core boot.jl:792

Possible fix, define
  ReverseDiff.TrackedReal{V, D, O}(::ReverseDiff.TrackedReal{V, D, O}) where {V, D, O}

Ambiguity #37
ReverseDiff.TrackedReal{V, D, O}(value) where {V, D, O} @ ReverseDiff ~/.julia/packages/ReverseDiff/UJhiD/src/tracked.jl:56
(::Type{T})(x::Base.TwicePrecision) where T<:Number @ Base twiceprecision.jl:265

Possible fix, define
  ReverseDiff.TrackedReal{V, D, O}(::Base.TwicePrecision) where {V, D, O}

Ambiguity #38
ReverseDiff.TrackedReal{V, D, O}(value) where {V, D, O} @ ReverseDiff ~/.julia/packages/ReverseDiff/UJhiD/src/tracked.jl:56
(::Type{T})(z::Complex) where T<:Real @ Base complex.jl:44

Possible fix, define
  ReverseDiff.TrackedReal{V, D, O}(::Complex) where {V, D, O}

Ambiguity #39
ReverseDiff.TrackedReal{V, D, O}(value) where {V, D, O} @ ReverseDiff ~/.julia/packages/ReverseDiff/UJhiD/src/tracked.jl:56
(::Type{T})(x::AbstractChar) where T<:Union{AbstractChar, Number} @ Base char.jl:50

Possible fix, define
  ReverseDiff.TrackedReal{V, D, O}(::AbstractChar) where {V, D, O}

Ambiguity #91
promote_rule(::Type{R}, ::Type{ReverseDiff.TrackedReal{V, D, O}}) where {R<:Real, V, D, O} @ ReverseDiff ~/.julia/packages/ReverseDiff/UJhiD/src/tracked.jl:280
promote_rule(::Type{<:AbstractIrrational}, ::Type{T}) where T<:Real @ Base irrationals.jl:44

Possible fix, define
  promote_rule(::Type{R}, ::Type{ReverseDiff.TrackedReal{V, D, O}}) where {V, D, O, R<:AbstractIrrational}

Ambiguity #93
promote_rule(::Type{R}, ::Type{ReverseDiff.TrackedReal{V, D, O}}) where {R<:Real, V, D, O} @ ReverseDiff ~/.julia/packages/ReverseDiff/UJhiD/src/tracked.jl:280
promote_rule(::Type{S}, ::Type{T}) where {S<:AbstractIrrational, T<:Number} @ Base irrationals.jl:45

Possible fix, define
  promote_rule(::Type{S}, ::Type{ReverseDiff.TrackedReal{V, D, O}}) where {S<:AbstractIrrational, V, D, O}

Ambiguity #108
sum(x::ReverseDiff.TrackedArray{V, D}, dims) where {V, D} @ ReverseDiff ~/.julia/packages/ReverseDiff/UJhiD/src/derivatives/linalg/reductions.jl:41
sum(f, a::AbstractArray; dims, kw...) @ Base reducedim.jl:1011

Possible fix, define
  sum(::ReverseDiff.TrackedArray{V, D}, ::AbstractArray) where {V, D}

I would appreciate your attention to this issue.

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

No branches or pull requests

1 participant