Fix: Run slicing pipeline plugins whose manifest reference is missing (#16884)

When a capability named in `slicing_pipeline_plugin` has no entry in the derived `plugins` manifest, the slicing pipeline now finds it by name among the loaded plugins instead of skipping it. The lookup moved into `PluginManager::resolve_capability_ref()`, so the manifest resolver and this fallback use the same rule.

A capability that isn't loaded is still skipped. So is a manifest entry that points at a plugin that isn't installed. No local plugin with the same capability name runs in its place.

Adds a test that slices with an empty manifest and checks that the capability ran.
This commit is contained in:
DIEHARDave authored and GitHub committed 2026-11-10 22:07:56 -06:00
1 parent 9696797638
commit bb81f6b39a
4 files changed
+84 -28

No files matched your search

+19
View File
@@ -5,6 +5,7 @@
#include <boost/filesystem/operations.hpp>
#include <exception>
#include <functional>
#include "libslic3r/Config.hpp"
#include "libslic3r/LifecycleEvents.hpp"
#include <memory>
#include <optional>
@@ -570,6 +571,24 @@ bool PluginManager::try_get_plugin_descriptor_for_capability(const std::string&
return false;
}
std::optional<PluginCapabilityRef> PluginManager::resolve_capability_ref(const std::string& capability_name,
PluginCapabilityType type) const
{
// only_enabled = false: a stored reference must stay resolvable whether or not the user
// currently has the capability enabled; the dispatchers report "disabled" separately.
if (!get_plugin_capability(capability_name, type, /*only_enabled=*/false))
return std::nullopt;
PluginDescriptor descriptor;
if (!try_get_plugin_descriptor_for_capability(capability_name, type, descriptor))
return std::nullopt;
// Cloud plugins are resolved at runtime via the UUID, so the name field keeps the friendly
// display name. Local plugins are looked up by plugin_key with an empty UUID.
const std::string identity = descriptor.is_cloud_plugin() ? descriptor.name : descriptor.plugin_key;
return PluginCapabilityRef{identity, capability_name, descriptor.cloud_uuid()};
}
std::string PluginManager::get_storage_dir(const std::string& plugin_key) const
{
namespace fs = boost::filesystem;