Skip to content

@dim cannot be used to export new dimensions #23

Closed
@haberdashPI

Description

@haberdashPI

MWE:

julia> module Foo
       using DimensionalData; using DimensionalData: @dim
       @dim Bar "Bar"
       export Bar
       end

julia> using .Foo

julia> DimensionalArray(rand(10),(Bar(1:10),))
ERROR: UndefVarError: Forward not defined
Stacktrace:
 [1] Bar(::UnitRange{Int64}) at /Users/davidlittle/.julia/packages/DimensionalData/sszkE/src/dimension.jl:192
 [2] top-level scope at REPL[3]:1

This looks like an issue with macro hygiene. Pretty sure I know how to fix it. I don't have a lot of time at the moment with a newborn in the house: if you don't end up getting to it yourself in a few weeks I can probably fix it by then.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions