Handle components provided by ComponentSources IMPLICITLY disappearing: gracefulness when developing SDCs: SDCs may appear/disappear from one request to the next
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3470422. --> Reported by: [kristen pol](https://www.drupal.org/user/8389) Related to !356 !220 !142 >>> <h3 id="overview">Overview</h3> <p>When you switch git branches and they have different components defined which have been read by drupal, there are errors like below. Clearing cache doesn't work so what's the best way to purge this old stuff?</p> <p><code>Drupal\Core\Render\Component\Exception\ComponentNotFoundException: Unable to find component "starshot_demo:old-starshot-one-col" in the component repository.</code></p> <h4>"explicit"</h4> <p><strong>Generally</strong> speaking, each component source has its own limiting behavior due to the different &hellip; <em>sources</em>:</p> <ul> <li><code>block</code> &rarr; the block plugin's module being uninstalled is blocked due to its corresponding <code>Component</code> config entity depending on the module</li> <li><code>sdc</code> &rarr; the SDC's module/theme being uninstalled is blocked due to its corresponding <code>Component</code> config entity depending on the theme/module</li> <li><code>js</code> &rarr; the <code>JavaScriptComponent</code> config entity being deleted/uninstalled is blocked due to its corresponding <code>Component</code> config entity depending on the config entity</li> </ul> <p><span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/experience_builder/issues/3519168" title="Status: Closed (fixed)">#3519168: Handle components provided by ComponentSources EXPLICITLY disappearing &mdash; enables deleting JS components that are in use</a></span> handled that.</p> <h4>"implicit"</h4> <p>This issue is about when a component disappears implicitly:</p> <ul> <li><code>block</code> &rarr; the block plugin disappearing from a module from one request to another (e.g. when developing, or changing a branch)</li> <li><code>sdc</code> &rarr; the SDC disappearing from a theme/module from one request to another (e.g. when developing, or changing a branch)</li> <li><code>js</code> &rarr; <del>the JS component config entity disappearing</del> should not be possible thanks to config dependencies, but when using <code>drush config:delete</code>, it totally is possible</li> </ul> <h3 id="proposed-resolution">Proposed resolution</h3> <p>See #25-#31.</p> <h3 id="ui-changes">User interface changes</h3> <p>See #26.</p> > Related issue: [Issue #3464036](https://www.drupal.org/node/3464036) > Related issue: [Issue #3473770](https://www.drupal.org/node/3473770) > Related issue: [Issue #3485878](https://www.drupal.org/node/3485878) > Related issue: [Issue #3522164](https://www.drupal.org/node/3522164) > Related issue: [Issue #3519168](https://www.drupal.org/node/3519168) > Related issue: [Issue #3532514](https://www.drupal.org/node/3532514) > Related issue: [Issue #3548922](https://www.drupal.org/node/3548922) > Related issue: [Issue #3553620](https://www.drupal.org/node/3553620) > Related issue: [Issue #3517941](https://www.drupal.org/node/3517941) > Related issue: [Issue #3558721](https://www.drupal.org/node/3558721) > Related issue: [Issue #3520484](https://www.drupal.org/node/3520484)
issue