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

Broken MeasurementsJunoExt.jl #158

Closed
johnzl-777 opened this issue Oct 20, 2023 · 1 comment · Fixed by #159
Closed

Broken MeasurementsJunoExt.jl #158

johnzl-777 opened this issue Oct 20, 2023 · 1 comment · Fixed by #159

Comments

@johnzl-777
Copy link

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)
@longemen3000
Copy link
Contributor

longemen3000 commented Oct 20, 2023

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

@giordano giordano linked a pull request Oct 31, 2023 that will close 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

Successfully merging a pull request may close this issue.

3 participants