Revise.jl with Parameters.jl erroneous "invalid redefinition of constant" in 1.3.1

Here is a file called ReviseBehavior.jl

module ReviseBehavior

using Parameters

@with_kw struct MyStruct
    x::Array{<:Real, 1} = [.05]
end
export MyStruct

function foo()
    print("hello")
end
export foo

end

Here is the behavior that I don’t think is right? Or I am not understanding something about how Revise.jl and/or Parameters.jl are supposed to operate.

julia> using ReviseBehavior
[ Info: Precompiling ReviseBehavior [top-level]

# here I go and change "hello" to "hello world" in ReviseBehavior.jl

julia> foo()
┌ Error: Failed to revise /home/at/Desktop/revise-behavior/ReviseBehavior.jl
│   exception =
│    invalid redefinition of constant MyStruct
│    Stacktrace:
│     [1] top-level scope at REPL[1]:0
└ @ Revise ~/.julia/packages/Revise/S7mrl/src/Revise.jl:590
┌ Warning: Due to a previously reported error, the running code does not match saved version for the following files:
│
│   /home/at/Desktop/revise-behavior/ReviseBehavior.jl
│
│ Use Revise.errors() to report errors again.
└ @ Revise ~/.julia/packages/Revise/S7mrl/src/Revise.jl:639
hello

I understand that Revise.jl can’t help me if I want to change something about a struct.
But here I am changing something in the function foo, not the struct.

I am using the latest versions of Revise.jl and Parameters.jl.
The problem occurs with Julia 1.3.1.
However, it does not occur with Julia 1.1.0.
In 1.1.0, I get this expected behavior:

julia> using ReviseBehavior
[ Info: Precompiling ReviseBehavior [top-level]

julia> foo()
hello world
julia>

Could you file that as an issue at https://github.com/timholy/Revise.jl/issues? I won’t get to it for a while and here I think it will just get lost.

How are you loading this code? As a package, or with includet? This is important for replicating your problem.

FWIW, both work fine for me on 1.3, 1.4, latest released Revise (v2.5.0).

As suggested, please open an issue.

Ok, I will go open an issue on the repository.
Edit: Here it is https://github.com/timholy/Revise.jl/issues/420

I’m not sure I understand the question.
I am loading Parameters.jl with

using Parameters

in the ReviseBehavior.jl file.
I load Revise.jl in my startup.jl with

atreplinit() do repl
    try
        @eval using Pkg
        haskey(Pkg.installed(), "Revise") || @eval Pkg.add("Revise")
    catch
    end
    try
        @eval using Revise
        @async Revise.wait_steal_repl_backend()
    catch
    end
end

which is suggested in the Revise.jl documentation.

Here are my package versions

(v1.3) pkg> status Revise Parameters
    Status `~/.julia/environments/v1.3/Project.toml`
  [d96e819e] Parameters v0.12.0
  [295af30f] Revise v2.5.0