<p dir="auto">I have a monorepo with the following structure:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="AdmissionSuite
    Admit
    AdmitConfiguration
    AdmissionTargets"><pre class="notranslate"><code class="notranslate">AdmissionSuite
    Admit
    AdmitConfiguration
    AdmissionTargets
</code></pre></div>
<p dir="auto">AdmissionSuite has no "real" source code on its own (though to avoid Pkg errors I have to add a dummy <code class="notranslate">src/AdmissionSuite.jl</code> with an empty module), its real role is to contain <code class="notranslate">Project.toml</code> and <code class="notranslate">Manifest.toml</code> files with all 3 subdirectories <code class="notranslate">dev</code>ved. This is an attempt to distribute a coherent collection of unregistered mutually-dependent packages (xref <a href="https://discourse.julialang.org/t/having-local-packages-in-a-monorepo-depend-on-one-another/50454/4?u=tim.holy" rel="nofollow">https://discourse.julialang.org/t/having-local-packages-in-a-monorepo-depend-on-one-another/50454/4?u=tim.holy</a>).</p>
<p dir="auto"><code class="notranslate">AdmitConfiguration</code> uses <code class="notranslate">Preferences.jl</code> and there is a <code class="notranslate">AdmissionSuite/AdmitConfiguration/LocalPreferences.toml</code> file. For debugging purposes, to <code class="notranslate">base/loading.jl</code> I added the following:</p>
<div class="highlight highlight-source-diff notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="diff --git a/base/loading.jl b/base/loading.jl
index 0a2d1b2ad9..68e41b6ce0 100644
--- a/base/loading.jl
+++ b/base/loading.jl
@@ -1741,6 +1741,7 @@ function get_uuid_name(project_toml::String, uuid::UUID)
 end
 
 function collect_preferences(project_toml::String, uuid::UUID)
+    @show project_toml uuid
     # We'll return a list of dicts to be merged
     dicts = Dict{String, Any}[]
 
@@ -1770,6 +1771,7 @@ function collect_preferences(project_toml::String, uuid::UUID)
         end
     end
 
+    @show dicts
     return dicts
 end"><pre class="notranslate"><span class="pl-c1">diff --git a/base/loading.jl b/base/loading.jl</span>
index 0a2d1b2ad9..68e41b6ce0 100644
<span class="pl-md">--- a/base/loading.jl</span>
<span class="pl-mi1">+++ b/base/loading.jl</span>
<span class="pl-mdr">@@ -1741,6 +1741,7 @@</span> function get_uuid_name(project_toml::String, uuid::UUID)
 end
 
 function collect_preferences(project_toml::String, uuid::UUID)
<span class="pl-mi1"><span class="pl-mi1">+</span>    @show project_toml uuid</span>
     # We'll return a list of dicts to be merged
     dicts = Dict{String, Any}[]
 
<span class="pl-mdr">@@ -1770,6 +1771,7 @@</span> function collect_preferences(project_toml::String, uuid::UUID)
         end
     end
 
<span class="pl-mi1"><span class="pl-mi1">+</span>    @show dicts</span>
     return dicts
 end</pre></div>
<p dir="auto">and then I get the following:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; Revise.track(Base)

(AdmissionSuite) pkg&gt; st
Status `~/.julia/dev/AdmissionSuite/Project.toml`
  [9b29e739] AdmissionTargets v0.1.0 `AdmissionTargets`
  [e9cde6de] Admit v0.1.0 `Admit`
  [19a2e0a6] AdmitConfiguration v0.1.0 `AdmitConfiguration`

julia&gt; using AdmitConfiguration
project_toml = &quot;/home/tim/.julia/environments/v1.8/Project.toml&quot;
uuid = UUID(&quot;19a2e0a6-566e-4c00-8888-a0edb19dbca0&quot;)
project_toml = &quot;/home/tim/.julia/dev/AdmissionSuite/Project.toml&quot;
uuid = UUID(&quot;19a2e0a6-566e-4c00-8888-a0edb19dbca0&quot;)
dicts = Dict{String, Any}[]
project_toml = &quot;/home/tim/.julia/environments/v1.8/Project.toml&quot;
uuid = UUID(&quot;ae029012-a4dd-5104-9daa-d747884805df&quot;)
dicts = Dict{String, Any}[]
project_toml = &quot;/home/tim/.julia/dev/AdmissionSuite/Project.toml&quot;
uuid = UUID(&quot;ae029012-a4dd-5104-9daa-d747884805df&quot;)
project_toml = &quot;/home/tim/.julia/environments/v1.8/Project.toml&quot;
uuid = UUID(&quot;9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a&quot;)
project_toml = &quot;/home/tim/.julia/dev/AdmissionSuite/Project.toml&quot;
uuid = UUID(&quot;9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a&quot;)
project_toml = &quot;/home/tim/.julia/environments/v1.8/Project.toml&quot;
uuid = UUID(&quot;21216c6a-2e73-6563-6e65-726566657250&quot;)
project_toml = &quot;/home/tim/.julia/dev/AdmissionSuite/Project.toml&quot;
uuid = UUID(&quot;21216c6a-2e73-6563-6e65-726566657250&quot;)
project_toml = &quot;/home/tim/.julia/environments/v1.8/Project.toml&quot;
uuid = UUID(&quot;e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28&quot;)
project_toml = &quot;/home/tim/.julia/dev/AdmissionSuite/Project.toml&quot;
uuid = UUID(&quot;e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28&quot;)
here
project_toml = &quot;/home/tim/.julia/environments/v1.8/Project.toml&quot;
uuid = UUID(&quot;19a2e0a6-566e-4c00-8888-a0edb19dbca0&quot;)
project_toml = &quot;/home/tim/.julia/dev/AdmissionSuite/Project.toml&quot;
uuid = UUID(&quot;19a2e0a6-566e-4c00-8888-a0edb19dbca0&quot;)
dicts = Dict{String, Any}[]
project_toml = &quot;/home/tim/.julia/environments/v1.8/Project.toml&quot;
uuid = UUID(&quot;19a2e0a6-566e-4c00-8888-a0edb19dbca0&quot;)
project_toml = &quot;/home/tim/.julia/dev/AdmissionSuite/Project.toml&quot;
uuid = UUID(&quot;19a2e0a6-566e-4c00-8888-a0edb19dbca0&quot;)
dicts = Dict{String, Any}[]
project_toml = &quot;/home/tim/.julia/environments/v1.8/Project.toml&quot;
uuid = UUID(&quot;19a2e0a6-566e-4c00-8888-a0edb19dbca0&quot;)
project_toml = &quot;/home/tim/.julia/dev/AdmissionSuite/Project.toml&quot;
uuid = UUID(&quot;19a2e0a6-566e-4c00-8888-a0edb19dbca0&quot;)
dicts = Dict{String, Any}[]
project_toml = &quot;/home/tim/.julia/environments/v1.8/Project.toml&quot;
uuid = UUID(&quot;19a2e0a6-566e-4c00-8888-a0edb19dbca0&quot;)
project_toml = &quot;/home/tim/.julia/dev/AdmissionSuite/Project.toml&quot;
uuid = UUID(&quot;19a2e0a6-566e-4c00-8888-a0edb19dbca0&quot;)
dicts = Dict{String, Any}[]"><pre class="notranslate">julia<span class="pl-k">&gt;</span> Revise<span class="pl-k">.</span><span class="pl-c1">track</span>(Base)

(AdmissionSuite) pkg<span class="pl-k">&gt;</span> st
Status <span class="pl-s"><span class="pl-pds">`</span>~/.julia/dev/AdmissionSuite/Project.toml<span class="pl-pds">`</span></span>
  [<span class="pl-c1">9</span>b29e739] AdmissionTargets v0.<span class="pl-c1">1.0</span> <span class="pl-s"><span class="pl-pds">`</span>AdmissionTargets<span class="pl-pds">`</span></span>
  [e9cde6de] Admit v0.<span class="pl-c1">1.0</span> <span class="pl-s"><span class="pl-pds">`</span>Admit<span class="pl-pds">`</span></span>
  [<span class="pl-c1">19</span>a2e0a6] AdmitConfiguration v0.<span class="pl-c1">1.0</span> <span class="pl-s"><span class="pl-pds">`</span>AdmitConfiguration<span class="pl-pds">`</span></span>

julia<span class="pl-k">&gt;</span> <span class="pl-k">using</span> AdmitConfiguration
project_toml <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>/home/tim/.julia/environments/v1.8/Project.toml<span class="pl-pds">"</span></span>
uuid <span class="pl-k">=</span> <span class="pl-c1">UUID</span>(<span class="pl-s"><span class="pl-pds">"</span>19a2e0a6-566e-4c00-8888-a0edb19dbca0<span class="pl-pds">"</span></span>)
project_toml <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>/home/tim/.julia/dev/AdmissionSuite/Project.toml<span class="pl-pds">"</span></span>
uuid <span class="pl-k">=</span> <span class="pl-c1">UUID</span>(<span class="pl-s"><span class="pl-pds">"</span>19a2e0a6-566e-4c00-8888-a0edb19dbca0<span class="pl-pds">"</span></span>)
dicts <span class="pl-k">=</span> Dict{String, Any}[]
project_toml <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>/home/tim/.julia/environments/v1.8/Project.toml<span class="pl-pds">"</span></span>
uuid <span class="pl-k">=</span> <span class="pl-c1">UUID</span>(<span class="pl-s"><span class="pl-pds">"</span>ae029012-a4dd-5104-9daa-d747884805df<span class="pl-pds">"</span></span>)
dicts <span class="pl-k">=</span> Dict{String, Any}[]
project_toml <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>/home/tim/.julia/dev/AdmissionSuite/Project.toml<span class="pl-pds">"</span></span>
uuid <span class="pl-k">=</span> <span class="pl-c1">UUID</span>(<span class="pl-s"><span class="pl-pds">"</span>ae029012-a4dd-5104-9daa-d747884805df<span class="pl-pds">"</span></span>)
project_toml <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>/home/tim/.julia/environments/v1.8/Project.toml<span class="pl-pds">"</span></span>
uuid <span class="pl-k">=</span> <span class="pl-c1">UUID</span>(<span class="pl-s"><span class="pl-pds">"</span>9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a<span class="pl-pds">"</span></span>)
project_toml <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>/home/tim/.julia/dev/AdmissionSuite/Project.toml<span class="pl-pds">"</span></span>
uuid <span class="pl-k">=</span> <span class="pl-c1">UUID</span>(<span class="pl-s"><span class="pl-pds">"</span>9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a<span class="pl-pds">"</span></span>)
project_toml <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>/home/tim/.julia/environments/v1.8/Project.toml<span class="pl-pds">"</span></span>
uuid <span class="pl-k">=</span> <span class="pl-c1">UUID</span>(<span class="pl-s"><span class="pl-pds">"</span>21216c6a-2e73-6563-6e65-726566657250<span class="pl-pds">"</span></span>)
project_toml <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>/home/tim/.julia/dev/AdmissionSuite/Project.toml<span class="pl-pds">"</span></span>
uuid <span class="pl-k">=</span> <span class="pl-c1">UUID</span>(<span class="pl-s"><span class="pl-pds">"</span>21216c6a-2e73-6563-6e65-726566657250<span class="pl-pds">"</span></span>)
project_toml <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>/home/tim/.julia/environments/v1.8/Project.toml<span class="pl-pds">"</span></span>
uuid <span class="pl-k">=</span> <span class="pl-c1">UUID</span>(<span class="pl-s"><span class="pl-pds">"</span>e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28<span class="pl-pds">"</span></span>)
project_toml <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>/home/tim/.julia/dev/AdmissionSuite/Project.toml<span class="pl-pds">"</span></span>
uuid <span class="pl-k">=</span> <span class="pl-c1">UUID</span>(<span class="pl-s"><span class="pl-pds">"</span>e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28<span class="pl-pds">"</span></span>)
here
project_toml <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>/home/tim/.julia/environments/v1.8/Project.toml<span class="pl-pds">"</span></span>
uuid <span class="pl-k">=</span> <span class="pl-c1">UUID</span>(<span class="pl-s"><span class="pl-pds">"</span>19a2e0a6-566e-4c00-8888-a0edb19dbca0<span class="pl-pds">"</span></span>)
project_toml <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>/home/tim/.julia/dev/AdmissionSuite/Project.toml<span class="pl-pds">"</span></span>
uuid <span class="pl-k">=</span> <span class="pl-c1">UUID</span>(<span class="pl-s"><span class="pl-pds">"</span>19a2e0a6-566e-4c00-8888-a0edb19dbca0<span class="pl-pds">"</span></span>)
dicts <span class="pl-k">=</span> Dict{String, Any}[]
project_toml <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>/home/tim/.julia/environments/v1.8/Project.toml<span class="pl-pds">"</span></span>
uuid <span class="pl-k">=</span> <span class="pl-c1">UUID</span>(<span class="pl-s"><span class="pl-pds">"</span>19a2e0a6-566e-4c00-8888-a0edb19dbca0<span class="pl-pds">"</span></span>)
project_toml <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>/home/tim/.julia/dev/AdmissionSuite/Project.toml<span class="pl-pds">"</span></span>
uuid <span class="pl-k">=</span> <span class="pl-c1">UUID</span>(<span class="pl-s"><span class="pl-pds">"</span>19a2e0a6-566e-4c00-8888-a0edb19dbca0<span class="pl-pds">"</span></span>)
dicts <span class="pl-k">=</span> Dict{String, Any}[]
project_toml <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>/home/tim/.julia/environments/v1.8/Project.toml<span class="pl-pds">"</span></span>
uuid <span class="pl-k">=</span> <span class="pl-c1">UUID</span>(<span class="pl-s"><span class="pl-pds">"</span>19a2e0a6-566e-4c00-8888-a0edb19dbca0<span class="pl-pds">"</span></span>)
project_toml <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>/home/tim/.julia/dev/AdmissionSuite/Project.toml<span class="pl-pds">"</span></span>
uuid <span class="pl-k">=</span> <span class="pl-c1">UUID</span>(<span class="pl-s"><span class="pl-pds">"</span>19a2e0a6-566e-4c00-8888-a0edb19dbca0<span class="pl-pds">"</span></span>)
dicts <span class="pl-k">=</span> Dict{String, Any}[]
project_toml <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>/home/tim/.julia/environments/v1.8/Project.toml<span class="pl-pds">"</span></span>
uuid <span class="pl-k">=</span> <span class="pl-c1">UUID</span>(<span class="pl-s"><span class="pl-pds">"</span>19a2e0a6-566e-4c00-8888-a0edb19dbca0<span class="pl-pds">"</span></span>)
project_toml <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>/home/tim/.julia/dev/AdmissionSuite/Project.toml<span class="pl-pds">"</span></span>
uuid <span class="pl-k">=</span> <span class="pl-c1">UUID</span>(<span class="pl-s"><span class="pl-pds">"</span>19a2e0a6-566e-4c00-8888-a0edb19dbca0<span class="pl-pds">"</span></span>)
dicts <span class="pl-k">=</span> Dict{String, Any}[]</pre></div>
<p dir="auto">indicating that the preferences are never loaded (<code class="notranslate">here</code> is printed at the entry point of <code class="notranslate">AdmitConfiguration</code>'s attempt to load its own preferences). This is because <code class="notranslate">Base.collect_preferences</code> never receives the <code class="notranslate">project_toml</code> of the subdirectory.</p>
<p dir="auto">There appear to be two potential solutions:</p>
<ul dir="auto">
<li>fix the path problem for subdirectories</li>
<li>store the configuration preferences in <code class="notranslate">AdmissionSuite</code> rather than the subdir package</li>
</ul>
<p dir="auto">Since the configuration written by <code class="notranslate">AdmitConfiguration</code> is intended for consumption by all the subpackages, there is a fair amount of sense in the latter. To attempt this, I added a <code class="notranslate">name</code> and <code class="notranslate">uuid</code> to <code class="notranslate">AdmissionSuite/Project.toml</code>, and then to <code class="notranslate">AdmitConfiguration</code> I added <code class="notranslate">using AdmissionSuite</code> and used <code class="notranslate">set_preferences!(uuid, ...)</code> where <code class="notranslate">uuid</code> is the <code class="notranslate">uuid</code> of <code class="notranslate">AdmissionSuite</code>. This initially seemed like it might work, but <code class="notranslate">LocalPreferences.jl</code> file got stored in my <code class="notranslate">v1.6/environments</code> despite the fact that <code class="notranslate">AdmissionSuite</code> was not in the <code class="notranslate">[deps]</code> of my global environment, and the preferences never ended up getting loaded. So, instead I modified the function that created the preferences file to use</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="    tomlfile = joinpath(pkgdir(AdmissionSuite), &quot;LocalPreferences.toml&quot;)
    set_preferences!(tomlfile, &quot;AdmissionSuite&quot;, prefs...)   # this method is undocumented"><pre class="notranslate">    tomlfile <span class="pl-k">=</span> <span class="pl-c1">joinpath</span>(<span class="pl-c1">pkgdir</span>(AdmissionSuite), <span class="pl-s"><span class="pl-pds">"</span>LocalPreferences.toml<span class="pl-pds">"</span></span>)
    <span class="pl-c1">set_preferences!</span>(tomlfile, <span class="pl-s"><span class="pl-pds">"</span>AdmissionSuite<span class="pl-pds">"</span></span>, prefs<span class="pl-k">...</span>)   <span class="pl-c"><span class="pl-c">#</span> this method is undocumented</span></pre></div>
<p dir="auto">and the <code class="notranslate">__init__</code> for <code class="notranslate">AdmitConfiguration</code> to use</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="    var1 = load_preference(AdmissionSuite, &quot;var1&quot;)
    ..."><pre class="notranslate">    var1 <span class="pl-k">=</span> <span class="pl-c1">load_preference</span>(AdmissionSuite, <span class="pl-s"><span class="pl-pds">"</span>var1<span class="pl-pds">"</span></span>)
    <span class="pl-k">...</span></pre></div>
<p dir="auto">This worked (the preferences get loaded with <code class="notranslate">using AdmitConfiguration</code>), but it is a narrow path to success and I only got there by reading the source code.</p>
<p dir="auto">While attempting to move FFTW over to using <code class="notranslate">Preferences</code> instead of environment variables/mutating its own state to record which backend is currently in use, I have discovered that <code class="notranslate">Pkg</code> generates a new project when running tests, and that new project drops unknown metadata.  I believe the culprit is this section:</p>
<p dir="auto"></p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/JuliaLang/Pkg.jl/blob/0fe89b17771a76e42373d2ec4477b36ba37d05db/src/Operations.jl#L1516-L1534">Pkg.jl/src/Operations.jl</a>
    </p>
    <p class="mb-0 color-fg-muted">
        Lines 1516 to 1534
      in
      <a data-pjax="true" class="commit-tease-sha" href="/JuliaLang/Pkg.jl/commit/0fe89b17771a76e42373d2ec4477b36ba37d05db">0fe89b1</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L1516" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1516"></td>
          <td id="LC1516" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"><span class="pl-c">#</span> collect relevant info from source</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L1517" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1517"></td>
          <td id="LC1517" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> source_env <span class="pl-k">=</span> <span class="pl-c1">EnvCache</span>(<span class="pl-c1">projectfile_path</span>(source_path)) </td>
        </tr>

        <tr class="border-0">
          <td id="L1518" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1518"></td>
          <td id="LC1518" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"><span class="pl-c">#</span> collect regular dependencies</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L1519" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1519"></td>
          <td id="LC1519" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> test_project<span class="pl-k">.</span>deps <span class="pl-k">=</span> source_env<span class="pl-k">.</span>project<span class="pl-k">.</span>deps </td>
        </tr>

        <tr class="border-0">
          <td id="L1520" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1520"></td>
          <td id="LC1520" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"><span class="pl-c">#</span> collect test dependencies</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L1521" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1521"></td>
          <td id="LC1521" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">for</span> name <span class="pl-k">in</span> <span class="pl-c1">get</span>(source_env<span class="pl-k">.</span>project<span class="pl-k">.</span>targets, target, String[]) </td>
        </tr>

        <tr class="border-0">
          <td id="L1522" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1522"></td>
          <td id="LC1522" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">     uuid <span class="pl-k">=</span> <span class="pl-c1">get</span>(source_env<span class="pl-k">.</span>project<span class="pl-k">.</span>extras, name, <span class="pl-c1">nothing</span>) </td>
        </tr>

        <tr class="border-0">
          <td id="L1523" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1523"></td>
          <td id="LC1523" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">     <span class="pl-k">if</span> uuid <span class="pl-k">===</span> <span class="pl-c1">nothing</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L1524" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1524"></td>
          <td id="LC1524" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">         <span class="pl-c1">pkgerror</span>(<span class="pl-s"><span class="pl-pds">"</span>`<span class="pl-v">$name</span>` declared as a `<span class="pl-v">$target</span>` dependency, but no such entry in `extras`<span class="pl-pds">"</span></span>) </td>
        </tr>

        <tr class="border-0">
          <td id="L1525" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1525"></td>
          <td id="LC1525" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">     <span class="pl-k">end</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L1526" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1526"></td>
          <td id="LC1526" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">     test_project<span class="pl-k">.</span>deps[name] <span class="pl-k">=</span> uuid </td>
        </tr>

        <tr class="border-0">
          <td id="L1527" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1527"></td>
          <td id="LC1527" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">end</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L1528" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1528"></td>
          <td id="LC1528" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"><span class="pl-c">#</span> collect compat entries</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L1529" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1529"></td>
          <td id="LC1529" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">for</span> (name, uuid) <span class="pl-k">in</span> test_project<span class="pl-k">.</span>deps </td>
        </tr>

        <tr class="border-0">
          <td id="L1530" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1530"></td>
          <td id="LC1530" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">     compat <span class="pl-k">=</span> <span class="pl-c1">get_compat_str</span>(source_env<span class="pl-k">.</span>project, name) </td>
        </tr>

        <tr class="border-0">
          <td id="L1531" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1531"></td>
          <td id="LC1531" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">     compat <span class="pl-k">===</span> <span class="pl-c1">nothing</span> <span class="pl-k">&amp;&amp;</span> <span class="pl-k">continue</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L1532" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1532"></td>
          <td id="LC1532" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">     <span class="pl-c1">set_compat</span>(test_project, name, compat) </td>
        </tr>

        <tr class="border-0">
          <td id="L1533" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1533"></td>
          <td id="LC1533" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">end</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L1534" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1534"></td>
          <td id="LC1534" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">return</span> test_project </td>
        </tr>
    </tbody></table>
  </div>
</div>
<p></p>
<p dir="auto">Since users (and other packages) are storing pieces of information inside of <code class="notranslate">Project.toml</code> files, I think we need to preserve as much information in the <code class="notranslate">Project.toml</code> as possible.</p>
<p dir="auto">For preferences in particular, we also need to copy any <code class="notranslate">LocalPreferences.toml</code> files to the temporary directory where the project is stored as well.  I am currently working around this by generating an explicit <code class="notranslate">test/Project.toml</code>, but this is obviously sub-optimal.</p>