Skip to content

Mimi.load_comps() loads compdefs into Mimi module #470

@corakingdon

Description

@corakingdon

haven't done much investigating into why this is happening yet, but if I try to use the build int load_comps function to load all my component files from a directory, I can't access my component definitions without doing Mimi.my_comp_name even though it's being included in the Main module

julia> Mimi.load_comps("src/components")

julia> IWG_DICE_co2cycle
ERROR: UndefVarError: IWG_DICE_co2cycle not defined

julia> Main.IWG_DICE_co2cycle
ERROR: UndefVarError: IWG_DICE_co2cycle not defined

julia> Mimi.IWG_DICE_co2cycle
Mimi.ComponentDef(:IWG_DICE_co2cycle, <ComponentId Main.IWG_DICE_co2cycle>, OrderedCollections.OrderedDict(:MAT=>DatumDef(:MAT, Number, Symbol[:time], "", "", :variable, nothing),:ML=>DatumDef(:ML, Number, Symbol[:time], "", "", :variable, nothing),:MU=>DatumDef(:MU, Number, Symbol[:time], "", "", :variable, nothing)), OrderedCollections.OrderedDict(:E=>DatumDef(:E, Number, Symbol[:time], "", "", :parameter, nothing),:mat0=>DatumDef(:mat0, Number, Symbol[], "", "", :parameter, nothing),:ml0=>DatumDef(:ml0, Number, Symbol[], "", "", :parameter, nothing),:mu0=>DatumDef(:mu0, Number, Symbol[], "", "", :parameter, nothing),:b11=>DatumDef(:b11, Number, Symbol[], "", "", :parameter, nothing),:b12=>DatumDef(:b12, Number, Symbol[], "", "", :parameter, nothing),:b21=>DatumDef(:b21, Number, Symbol[], "", "", :parameter, nothing),:b22=>DatumDef(:b22, Number, Symbol[], "", "", :parameter, nothing),:b23=>DatumDef(:b23, Number, Symbol[], "", "", :parameter, nothing),:b32=>DatumDef(:b32, Number, Symbol[], "", "", :parameter, nothing)…), OrderedCollections.OrderedDict{Symbol,Union{Nothing, Dimension}}(:time=>nothing), nothing, nothing)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions