# Does Reexport break Revise?

**URL:** <https://discourse.julialang.org/t/does-reexport-break-revise/82717>\
**Category:** General Usage\
**Created:** [June 14, 2022, 1:33am UTC](https://discourse.julialang.org/t/does-reexport-break-revise/82717 "2022-06-14T01:33:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonathan-laurent](https://avatars.discourse-cdn.com/v4/letter/j/ecae2f/32.png) [@jonathan-laurent](https://discourse.julialang.org/u/jonathan-laurent)\
**Post date:** [June 14, 2022, 1:33am UTC](https://discourse.julialang.org/t/does-reexport-break-revise/82717/1 "2022-06-14T01:33:17Z")

</div>

Suppose one is defining the following package:

```julia
module MyPackage
    using Reexport
    @reexport module Sub
        export f
        f() = 0
    end
end

```

Let’s now play with it using Revise:

```julia
using Revise
using MyPackage
MyPackage.Sub.f() # returns: 0 
MyPackage.f() # returns: 0 

```

Now, suppose I modify the source code of my package to define `f() = 1` instead. Then, I get the following:

```julia
MyPackage.Sub.f() # returns: 1
MyPackage.f() # returns: 0 (!!)

```

Note that the first (correct) call also prints the following warning:

```nohighlight
WARNING: replacing module Sub.
WARNING: using Sub.f in module MyPackage conflicts with an existing identifier.

```

Is there something I am missing here? Reexport.jl is a pretty standard and widely used package and so I have a hard time imagining that it is breaking the Revise workflow.

**Note:** I am using Revise v3.3.3, Reexport v1.2.2 and Julia 1.7.3.

---

<div class="post-metadata">

**Author:** ![jonathan-laurent](https://avatars.discourse-cdn.com/v4/letter/j/ecae2f/32.png) [@jonathan-laurent](https://discourse.julialang.org/u/jonathan-laurent)\
**Post date:** [June 14, 2022, 3:20am UTC](https://discourse.julialang.org/t/does-reexport-break-revise/82717/2 "2022-06-14T03:20:36Z")

</div>

**Update:** the problem does not happen with the following package:

```julia
module MyPackage
    using Reexport
    module Sub
        export f
        f() = 0
    end
    @reexport using .Sub
end

```

This is surprising to me since I thought these package definitions were basically equivalent. Os it it that Revise does get confused when a submodule definition is prefixed by a macro call?
