You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
module QuantumControl
using Reexport
@reexportusing QuantumControlBase
end
then if a user does using QuantumControl, they'll not just get the members of QuantumControlBase injected into their Main, but also QuantumControlBase itself. Maybe this is by design, but I can't think of any situation where I would want that (and it would break the desired behavior of my actual QuantumControl package). I think this can be fixed by changing
Again, the intent here is for the members of QuantumControlBase.Shapes to be re-exported from QuantumControl.Shapes. This actually doesn't reexport anything, even if I modify exported_names as described above. I think it's because QuantumControl.Shapes and QuantumControlBase.Shapes have the same Shapes name, but I don't have a full grasp on what's going on there.
Suppose I have
then if a user does
using QuantumControl
, they'll not just get the members ofQuantumControlBase
injected into theirMain
, but alsoQuantumControlBase
itself. Maybe this is by design, but I can't think of any situation where I would want that (and it would break the desired behavior of my actual QuantumControl package). I think this can be fixed by changingReexport.jl/src/Reexport.jl
Line 48 in f0d5b25
that is, filtering out
m
itself.A possibly related problem is with sub-modules:
Again, the intent here is for the members of
QuantumControlBase.Shapes
to be re-exported fromQuantumControl.Shapes
. This actually doesn't reexport anything, even if I modifyexported_names
as described above. I think it's becauseQuantumControl.Shapes
andQuantumControlBase.Shapes
have the sameShapes
name, but I don't have a full grasp on what's going on there.I've been able to deal with my specific use case by writing my own much more trivial re-export macro. I still had to work around the issue of clashing sub-module names with some trickery. Still, I wouldn't have minded using Reexport.jl directly
The text was updated successfully, but these errors were encountered: