Skip to content

don't sort! parents when empty in order() #315

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

Merged
merged 1 commit into from
Dec 7, 2021

Conversation

mattwigway
Copy link
Contributor

This avoids the following error which crashes the scheduler:

MethodError: defalg(::Vector{Union{}}) is ambiguous. Candidates:
  defalg(v::AbstractArray{<:Union{Missing, Number}}) in Base.Sort at sort.jl:658
  defalg(::AbstractArray{<:Union{Missing, String1, String15, String3, String7}}) in InlineStrings at /Users/juliauser/.julia/packages/InlineStrings/C5tOh/src/InlineStrings.jl:656
Possible fix, define
  defalg(::AbstractArray{<:Missing})

When parents is empty in order(), it has type Vector{Union{}}. Since Union{} is a subtype of all
Union{...any types here...} types, any package that defines Base.defalg(AbstractArray{<:Union{...any type...}})
will cause an ambiguity error. This is true even without type piracy, as the Union in the other package could
consist entirely of types defined in that package.

@jpsamaroo

When parents is empty in order(), it has type Vector{Union{}}. Since Union{} is a subtype of all
Union{...any types here...} types, any package that defines Base.defalg(AbstractArray{<:Union{...any type...}})
will cause an ambiguity error. This is true even without type piracy, as the Union in the other package could
consist entirely of types defined in that package.
Copy link
Member

@jpsamaroo jpsamaroo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for patching this!

@krynju krynju linked an issue Dec 7, 2021 that may be closed by this pull request
@jpsamaroo jpsamaroo merged commit e6d2a47 into JuliaParallel:master Dec 7, 2021
@jpsamaroo
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

Method ambiguity for simple Thunks
2 participants