Skip to content

Unsafe use of MOI #100

@mlubin

Description

@mlubin

The code below is accessing fields in a way that assumes jm_cache is a MOI.Utilities.UniversalFallback. This doesn't match the type of the argument (MOI.ModelLike) and could break in multiple ways. You should use the MOI API instead to query properties like variable bounds and starts.

https://github.com/exanauts/ExaModels.jl/blob/0ac40c25602229ecf8c65f5cf1ae70a13f1348bd/ext/ExaModelsMOI.jl#L58C10-L78

CC @blegat

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions