<p dir="auto">A user of my package <a href="https://github.com/crstnbr/BinningAnalysis.jl">BinningAnalysis.jl</a> approached me yesterday with the following peace of code.</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="using BinningAnalysis
mutable struct MyStruct
    x::LogBinner{Float64,32}
end
function run!(s::MyStruct)
    push!(s.x, rand())
end
s = MyStruct(LogBinner(Float64))
run!(s)"><pre class="notranslate"><span class="pl-k">using</span> BinningAnalysis
<span class="pl-k">mutable struct</span> MyStruct
    x<span class="pl-k">::</span><span class="pl-c1">LogBinner{Float64,32}</span>
<span class="pl-k">end</span>
<span class="pl-k">function</span> <span class="pl-en">run!</span>(s<span class="pl-k">::</span><span class="pl-c1">MyStruct</span>)
    <span class="pl-c1">push!</span>(s<span class="pl-k">.</span>x, <span class="pl-c1">rand</span>())
<span class="pl-k">end</span>
s <span class="pl-k">=</span> <span class="pl-c1">MyStruct</span>(<span class="pl-c1">LogBinner</span>(Float64))
<span class="pl-c1">run!</span>(s)</pre></div>
<p dir="auto">His observation (which I can reproduce on both Julia 1.5 and 1.6) was that <code class="notranslate">run!(s)</code> takes forever / hangs indefinitely. To investigate the issue I tried <code class="notranslate">@code_warntype run!(s)</code> which also hung indefinitely. Just by inspection, I realised that the underlying issue is that a third type parameter has <a href="https://github.com/crstnbr/BinningAnalysis.jl/pull/65" data-hovercard-type="pull_request" data-hovercard-url="/carstenbauer/BinningAnalysis.jl/pull/65/hovercard">recently</a> been added to the type <code class="notranslate">LogBinner</code>. Just by upgrading BinningAnalysis, the type of the field <code class="notranslate">x</code> has subtly changed from concrete to abstract. If I adjust the field's type appropriately, everything is fast again.</p>
<p dir="auto">Reasons for filing this issue:</p>
<ol dir="auto">
<li>While it is understood that using abstract types for fields is a performance gotcha, Julia shouldn't hang indefinitely here.</li>
<li>The fact, that <code class="notranslate">LogBinner{Float64,32}</code> is abstract is very subtle / hard to realise for the user. Perhaps we should force users to specify all type parameters?</li>
</ol>
<p dir="auto">Hi guys!</p>
<p dir="auto">I'm packing latest git version of Julia and today I noticed the following warning:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia-unstable-debug.x86_64: W: no-soname /usr/lib64/libjulia-debug.so.0.5.0"><pre class="notranslate"><code class="notranslate">julia-unstable-debug.x86_64: W: no-soname /usr/lib64/libjulia-debug.so.0.5.0
</code></pre></div>
<p dir="auto">Indeed, using <code class="notranslate">objdump</code> I can see that there is no SONAME in the <code class="notranslate">-debug</code> library:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# objdump -x libjulia-debug.so.0.5.0  |grep SONAME
#"><pre class="notranslate"><code class="notranslate"># objdump -x libjulia-debug.so.0.5.0  |grep SONAME
#
</code></pre></div>
<p dir="auto">Notice that everything is fine with <code class="notranslate">libjulia.so.0.5.0</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# objdump -x libjulia.so.0.5.0  |grep SONAME
  SONAME               libjulia.so.0.5
#"><pre class="notranslate"><code class="notranslate"># objdump -x libjulia.so.0.5.0  |grep SONAME
  SONAME               libjulia.so.0.5
#
</code></pre></div>
<p dir="auto">Is there anyway to fix this problem?</p>