-
Notifications
You must be signed in to change notification settings - Fork 126
Description
While building Documentation 16: Differentiable programming fails.
In part Propagating errors using Measurements.jl we are using following code:
semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition_convergence_test,
solver, uEltype=Measurement{Float64})
And finally LoadError appears (building summary)
Differentiable programming: Error During Test at /home/runner/work/Trixi.jl/Trixi.jl/docs/literate/make.jl:59
Got exception outside of a @test
LoadError: MethodError: no method matching Float64(::Measurement{Float64})
I looked in History of Measurements.jl. They released new version 2.9.0 last week with following:
-
New methods value(::Missing) and uncertainty(::Missing) (#127, #128).
-
one(::Measurement{T}) now returns one(T), instead of an instance of Measurement{T} (#134, #135). This change should not breaking (and hence the major version was not increased), unless you were relying on the previous incorrect return type of one(::Measurement{T}), which did not follow the precise semantic of the one function.
Then I downgraded version of Measurements.jl to previous one - 2.8.0. And after that error disappeared. I think that Trixi or related packages use function one(uEltype) (explicit or implicit) somewhere.
Like a temporal solution I added following code to 16: Differentiable programming in my PR.
using Pkg #hide #md
Pkg.add(name="Measurements", version="2.8.0") #hide #md
Now Documentation check doesn't fail. But it doesn't seem to be a good solution.