JuliaData / NamedTuples.jl

[DEPRECATED] NamedTuples.jl
Other
30 stars 17 forks source link

Change module where NamedTuples are defined #46

Closed quinnj closed 6 years ago

quinnj commented 6 years ago

I saw this was marked as a todo and some new code I have in DataStreams for 0.6 relies on this. Any reason to change it?

omus commented 6 years ago

Bump

davidanthoff commented 6 years ago

Have you tested whether this works with downstream packages? It does seem like a breaking change.

omus commented 6 years ago

Thanks for mentioning this. Looks like we should be using @__MODULE__ instead.

omus commented 6 years ago

After a deeper dive I think this change is a step in the wrong direction. The change to current_module() is one way to fix pre-compilation but it also results in distinct named tuple types being created in each module. Since this is only a problem for module pre-compilation where @NT is used at the top-level a better approach is to use the package's __init__.

These changes will be reverted in #59 and will also include a test for this behaviour.