<p dir="auto">We should make it possible to update some parts of sysimg (e.g. different stdlibs) to let all Julia versions use bug fixes without the need to update Julia.</p>
<p dir="auto">One solution may be to use separate files for each stdlib, which Pkg can update them.</p>
<p dir="auto">I have seen this issue a lot in the pull requests and issues. People avoid adding a feature to Julia because they are afraid they cannot update it later in case some change is needed. Some examples: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="640578175" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/36326" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/36326/hovercard" href="https://github.com/JuliaLang/julia/issues/36326">#36326</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="636244132" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/36223" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/36223/hovercard" href="https://github.com/JuliaLang/julia/pull/36223">#36223</a>, Pkg's artifacts system, etc.</p>
<p dir="auto">This is mostly just a meta issue attempting to summarize several existing discussions (issues). I'll try to include links to existing issues I've found whenever possible, but if I miss something please feel free to post a suggestion.</p>
<h1 dir="auto">Problem</h1>
<p dir="auto">I think the general problem is best summarized by the following statement:</p>
<blockquote>
<p dir="auto">stdlibs are the place code goes to die</p>
</blockquote>
<p dir="auto">I don't think this statement is entirely fair, but folks do seem to avoid contributing new stdlibs, fixes or updates (myself included). From my experience this is mostly because the stdlib dev workflow is closer to working on the core language rather than working on an external package (Pkg.jl and Statistics.jl sit in the middle).</p>
<h1 dir="auto">Solutions</h1>
<p dir="auto">Here are some things that might make this better from a user standpoint.</p>
<ul dir="auto">
<li>Developing a stdlib: <code class="notranslate">] dev Statistics</code> (current solution is pretty manual)</li>
<li>Using the latest version of a stdlib: <code class="notranslate">] free Statistics</code> (so stdlibs are basically just pinned default packages that can be unpinned and updated).</li>
<li>Clearer documentation around what should be in <code class="notranslate">Base</code>, stdlibs or an external package. I think folks jump to wanting things in <code class="notranslate">Base</code> that could often be an independent stdlib or even an external package?</li>
</ul>
<h1 dir="auto">Technical Challenges</h1>
<p dir="auto">A couple technical problems that I've seen from other issues include:</p>
<ul dir="auto">
<li><em>stdlib load times</em>: We can include stdlibs in the system image by default, but what happens if you dev a stdlib? Do we rebuild the sysimg or just take the load time hit? What happens for downstream stdlib dependencies?</li>
<li><em>stdlib artifacts</em>: Should changing a stdlib version trigger re-downloading any required build artifacts?</li>
<li><em>Pkg dependencies</em>: More of a question, but would it be possible for Pkg.jl to handle replacing itself or its dependencies (similar to <code class="notranslate">pip install -U pip</code>) and just requiring a restart? Currently, Pkg.jl doesn't need to define a <code class="notranslate">compat</code> because all dependencies are baked stdlibs, but if all stdlibs could be updated then I assume we'd need to handle potential incompatibilities appropriately?</li>
</ul>
<h1 dir="auto">Links</h1>
<ul dir="auto">
<li><a href="https://github.com/JuliaLang/julia/issues/27197" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/27197/hovercard">stdlibs as packages</a></li>
<li><a href="https://github.com/JuliaLang/julia/issues/33973" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/33973/hovercard">stdlib artifacts</a></li>
<li><a href="https://github.com/JuliaLang/Pkg.jl#using-the-development-version-of-pkgjl">Steps for <code class="notranslate">dev</code>ing a stdlib</a></li>
</ul>