Skip to content

Documentation building bug (related to Measurements.jl) #1378

@ArseniyKholod

Description

@ArseniyKholod

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions