Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@dim cannot be used to export new dimensions #23

Closed
haberdashPI opened this issue Dec 14, 2019 · 5 comments
Closed

@dim cannot be used to export new dimensions #23

haberdashPI opened this issue Dec 14, 2019 · 5 comments

Comments

@haberdashPI
Copy link

haberdashPI commented Dec 14, 2019

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.

@haberdashPI haberdashPI changed the title @dim cannot be to export new dimensions @dim cannot be used to export new dimensions Dec 14, 2019
@rafaqz
Copy link
Owner

rafaqz commented Dec 14, 2019

Thanks for the clear example., I suspected there was an issue with that. Will probably get to it before then.

It can definately be used to export dimensions from one package to another, I have a bunch of packages doing that., but there is an issue with something.

@rafaqz
Copy link
Owner

rafaqz commented Dec 14, 2019

I actually can't replicate this. Are you using the latest master?

Also how are you calling DimensionalArray outside of Foo without using DimensionalData ?

@haberdashPI
Copy link
Author

Ah yes, my apologies. This works fine on master. I was using the latest tagged version.

@rafaqz
Copy link
Owner

rafaqz commented Dec 15, 2019

There a a lot of changes to grids coming up so master might be a bit scary for the next few weeks. I'll tag the current state.

Edit: actually 0.3.0 is the latest master. It only went in a few days ago.

@haberdashPI
Copy link
Author

Ah yes, very sorry for the noise here. It is all working for me now. Guess sleep deprivation is affecting me more than I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants