2026.1 Facets in unit tests incompatibility

Trying to update my plugin for 2026.1 all of my tests fail here. The error is because my facet doesn’t exist:

Caused by: java.lang.NullPointerException: null cannot be cast to non-null type com.demonwav.mcdev.facet.MinecraftFacetType
	at com.demonwav.mcdev.facet.MinecraftFacet$Companion.getFacetType(MinecraftFacet.kt:255)
	at com.demonwav.mcdev.framework.BaseMinecraftTestKt$getProjectDescriptor$1.configureModule(BaseMinecraftTest.kt:63)
	at com.intellij.testFramework.LightProjectDescriptor.lambda$createContentEntry$2(LightProjectDescriptor.java:145)

The problem is my facet type is not registered, so my code trying to get my facet type always fails.

This issue is specific to 2026.1 but I can’t find any documentation or any indication of how I’m supposed to work around this. When I list all registered facet types, mine is nowhere to be found. Do I need to do something to force my facet type to load?

The issue is my plugin wasn’t loaded due to new bundled plugin dependency requirements.

I had to add bundledPlugin("org.jetbrains.idea.reposearch") for 2026.1 due to some changes in the Maven plugin.

This smoke test helped figure that out:

    @Test
    @Suppress("UnstableApiUsage")
    fun testPluginEnabled() {
        // This test helps to detect cases where some plugin(s) cannot be loaded.
        // One reason is that some major IDE versions include changes to plugin dependencies which cause
        //  our plugin not to load in tests, often because they added a mandatory dependency not available by default.
        val loadingErrors = PluginManagerCore.getAndClearPluginLoadingErrors()
        Assertions.assertTrue(loadingErrors.isEmpty()) {
            loadingErrors.mapNotNull { it.reason }.joinToString("\n", "\n") { it.detailedMessage }
        }
    }