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

for 1 of 2 union split cases, non-boolean (Missing) used in boolean context #333

Closed
dpinol opened this issue Mar 17, 2022 · 1 comment
Closed

Comments

@dpinol
Copy link
Contributor

dpinol commented Mar 17, 2022

I haven't been able to create a minimal test case. This is my environment

  • Julia 1.7.2
  • JET 0.5.7
  • Running report_package on my package A reports no issues
  • Running report_package on a package B which uses A reports an issue on a function on package A
  • Running report_call or @report_call on the failing function I get no error.
│┌ @ /home/dani/source/repos/sc-engine/src/utils/tracks.jl:139 SCEngine.Utils.#track#51(results, _3, r)
│││┌ @ logging.jl:360 msg = Base.string("Tracking performance for '", Base.getproperty(r, :key), "' for tags ", Base.getproperty(r, :tags), ":")
││││┌ @ strings/io.jl:185 Base.print_to_string(xs...)
│││││┌ @ strings/io.jl:144 Base.print(s, x)
││││││┌ @ strings/io.jl:35 Base.show(io, x)
│││││││┌ @ arrayshow.jl:481 Base.show_vector(io, X)
││││││││┌ @ arrayshow.jl:510 #self#(io, v, '[', ']')
│││││││││┌ @ arrayshow.jl:510 Base.typeinfo_prefix(io, v)
││││││││││┌ @ arrayshow.jl:578 goto %49 if not Base.typeinfo_implicit(eltype_X)
│││││││││││ for 1 of 2 union split cases, non-boolean (Missing) used in boolean context: goto %49 if not Base.typeinfo_implicit(eltype_X::Type{Pair{String, String}})::Union{Missing, Bool}
││││││││││└────────────────────

This is the relevant code

const TrackFieldValue = Pair{String, String}
const TrackFieldsType = AbstractVector{TrackFieldValue}

struct PerformanceTracker
    tags::TrackFieldsType
end
# the line below reports the issue
function track(r::PerformanceTracker)
 @info "Tracking performance for tags $(r.tags):"
end

Adding skipmissing does not help
@info "Tracking performance for tags $(skipmissing(r.tags)):"

Strangely, none of the following lines trigger the report

    println(r.tags)
    println(join(r.tags, ","))
    println(join(string.(r.tags), ","))

Any idea on what's the isssue?

thanks

@aviatesk
Copy link
Owner

aviatesk commented Jul 4, 2022

It seems like I can't reproduce this error at least on the JET master.

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

2 participants