JuliaPhysics / Measurements.jl

Error propagation calculator and library for physical measurements. It supports real and complex numbers with uncertainty, arbitrary precision calculations, operations with arrays, and numerical integration.

Home Page:https://juliaphysics.github.io/Measurements.jl/stable/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Broken `MeasurementsJunoExt.jl`

johnzl-777 opened this issue · comments

There seems to be a "broken" line (line 32) in ext/MeasurementsJunoExt.jl with the following piece of code that seems to be an incomplete one-line function definition:

Juno.Row(measure.val, Text(" ± "), measure.err)

I've seen this cause precompilation failures (although oddly enough I can't replicate the problem when the package is by itself in a standalone environment).

I assume this should be the fix:

Juno.Row(measure) = 
Juno.Row(measure.val, Text(" ± "), measure.err)

the error seems from before the Juno functionality was moved into an extension:

@require Juno="e5e0dc1b-0480-54bc-9374-aad01c23163d" begin
Juno.render(i::Juno.Inline, measure::Measurement) =
Juno.render(i, Juno.Row(measure.val, Text(" ± "), measure.err))
Juno.Row(measure.val, Text(" ± "), measure.err)
function Juno.render(ji::Juno.Inline, cm::Complex{<:Measurement})
r, i = reim(cm)
if signbit(i) && !isnan(i)
i = -i
sss = " - "
else
sss = " + "
end
Juno.render(ji, Juno.Row("(", Juno.render(ji, r), ")", sss,
"(", Juno.render(ji, i), ")im"))
end
end

i followed the line and was introduced in #14