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 #161

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

Method ambiguities reported by Aqua #161

prbzrg opened this issue Dec 27, 2023 · 0 comments

Comments

@prbzrg
Copy link
Contributor

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 #5
==(x::Tracker.TrackedReal, y::Real) @ Tracker ~/.julia/packages/Tracker/5lAQO/src/lib/real.jl:47
==(x::Real, y::AbstractIrrational) @ Base irrationals.jl:90

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

Ambiguity #6
==(x::Real, y::Tracker.TrackedReal) @ Tracker ~/.julia/packages/Tracker/5lAQO/src/lib/real.jl:48
==(x::AbstractIrrational, y::Real) @ Base irrationals.jl:89

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

Ambiguity #16
Base.Broadcast.BroadcastStyle(::Tracker.TrackedStyle, ::Base.Broadcast.BroadcastStyle) @ Tracker ~/.julia/packages/Tracker/5lAQO/src/lib/array.jl:632
Base.Broadcast.BroadcastStyle(::S, ::Base.Broadcast.Unknown) where S<:BroadcastStyle @ Base.Broadcast broadcast.jl:133

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

Ambiguity #41
^(a::Tracker.TrackedReal, b::Real) @ Tracker ~/.julia/packages/Tracker/5lAQO/src/lib/real.jl:91
^(x::Number, y::Rational) @ Base rational.jl:511

Possible fix, define
  ^(::Tracker.TrackedReal, ::Rational)

Ambiguity #42
^(a::Real, b::Tracker.TrackedReal) @ Tracker ~/.julia/packages/Tracker/5lAQO/src/lib/real.jl:92
^(::Irrational{:ℯ}, x::Number) @ Base.MathConstants mathconstants.jl:119

Possible fix, define
  ^(::Irrational{:ℯ}, ::Tracker.TrackedReal)

Ambiguity #77
findfirst(xs::Tracker.TrackedArray, args...) @ Tracker ~/.julia/packages/Tracker/5lAQO/src/lib/array.jl:389
findfirst(pattern::AbstractVector{<:Union{Int8, UInt8}}, A::AbstractVector{<:Union{Int8, UInt8}}) @ Base strings/search.jl:158

Possible fix, define
  findfirst(::Tracker.TrackedVector{T, A} where {T<:Union{Int8, UInt8}, A<:AbstractVector{T}}, ::AbstractVector{<:Union{Int8, UInt8}})

Ambiguity #82
log(a::Real, b::Tracker.TrackedReal) @ Tracker ~/.julia/packages/Tracker/5lAQO/src/lib/real.jl:92
log(::Irrational{:ℯ}, x::Number) @ Base.MathConstants mathconstants.jl:124

Possible fix, define
  log(::Irrational{:ℯ}, ::Tracker.TrackedReal)

Ambiguity #97
reshape(xs::Tracker.TrackedArray, dims::Union{Colon, Int64}...) @ Tracker ~/.julia/packages/Tracker/5lAQO/src/lib/array.jl:302
reshape(parent::AbstractVector, ::Colon) @ Base reshapedarray.jl:115

Possible fix, define
  reshape(::Tracker.TrackedVector{T, A} where {T, A<:AbstractVector{T}}, ::Colon)

Ambiguity #98
reshape(xs::Tracker.TrackedArray, dims::Tuple{Vararg{Union{Colon, Int64}}}) @ Tracker ~/.julia/packages/Tracker/5lAQO/src/lib/array.jl:303
reshape(parent::AbstractVector, ::Tuple{Colon}) @ Base reshapedarray.jl:116

Possible fix, define
  reshape(::Tracker.TrackedVector{T, A} where {T, A<:AbstractVector{T}}, ::Tuple{Colon})

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