Skip to content

findmax does different things on Julia 1.6 and 1.7 with the same version of Compat #745

Closed
@ericphanson

Description

@ericphanson
❯ julia-1.7 -q
julia> using Compat # v3.31.0

julia> findmax(identity, 5:9)
(9, 5)

julia> VERSION
v"1.7.0-beta2"

❯ julia-1.6 -q
julia> using Compat # v3.31.0

julia> findmax(identity, 5:9)
(9, 9)

julia> VERSION
v"1.6.1"

This is, of course, since the choice of what findmax does changed between when #738 was made and the 1.7-beta2 release, and in Compat, the definitions are gated around versions, so on 1.7 the real definition is let through, while on 1.6, the Compat definition is used.

But how do we fix this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions