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

Incomplete update of package #730

Open
nrontsis opened this issue Jan 30, 2023 · 1 comment
Open

Incomplete update of package #730

nrontsis opened this issue Jan 30, 2023 · 1 comment
Labels

Comments

@nrontsis
Copy link

Copied from this discourse thread

I am getting incomplete package updates from Revise.jl 3.5.0 in Julia 1.8.2 Linux x64 (Docker on MacOS 13.1) which I managed to track to the following minimal example:

Example Package

src/Example.jl:

module Example
     module A
         include("a.jl")
     end
     module B
         include("a.jl")
     end
     export A, B
end

src/a.jl:

f(x) = y

Manifest.toml:

name = "Example"
uuid = "1fcb2a49-e178-4b19-98f0-97e19ed5c4de"
authors = ["Some Authors"]
version = "0.1.0"

[deps]
Revise = "295af30f-e4ad-537b-8983-00126c2a3abe"

and empty test folder

Example Session (launched via julia --project on the package's dir):

julia> using Revise
julia> using Example
[ Info: Precompiling Example [1fcb2a49-e178-4b19-98f0-97e19ed5c4de]
julia> A.f(1)
ERROR: UndefVarError: y not defined
Stacktrace:
 [1] f(x::Int64)
   @ Example.A src/a.jl:1
 [2] top-level scope

...
[Correct src/a.jl to be f(x) = x]
...

julia> A.f(1)
1

julia> B.f(1)
ERROR: UndefVarError: y not defined
Stacktrace:
 [1] f(x::Int64)
   @ Example.B src/a.jl:1
 [2] top-level scope

In the example above B.f remains broken, even though a restart of the session would fix it

@timholy timholy added the bug label Jan 4, 2024
@timholy
Copy link
Owner

timholy commented Jan 4, 2024

In general I don't recommend including the same file twice, but with some effort this should be fixable (there's a start in the teh/fix_730 branch).

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

No branches or pull requests

2 participants