Add println in Julia code and reload, can this be done? (likely bug in WeakKeyDict)

Context: The following command causes a dead-lock in 1.4.0-DEV.407 (2019-10-31) and likely also in 1.3. It works fine in 1.03 and 1.2.

x = WeakKeyDict(:a1 => 4)
push!(x, :a2 => 2) # WARNING: deadlock here

I thought I could add some println statements in setindex!in ‘weakkeydict.jl’ and then include the modified file. Not unexpectedly this didn’t work but I wonder if there is a possibility to change Julia code and then take into account the changes? I rebuild Julia with the make command which worked but took a long time.

(Regarding dead-lock: it hangs when executing

1 Like

See For changing Julia’s base code you’d need to say Revise.track(Base) for any changes to take effect.


Incredible. Worked perfectly. Didn’t think that Revise goes that far. Thanks a lot!

Regarding dead-lock. I will make an issue in github soon. [Edit: here is a PR As mentioned, I’m not 100 % sure about the proposed solution]