[UNRESOLVED_IMPORT] Unresolved reference 'YAMLFileType'

Hi

Getting this error when using the latest target:
251-EAP-SNAPSHOT 2025-02-06 02:04:21 UTC 251.20015.29

on macos

p.s. - I missing the slack :frowning:

2 Likes

Please provide more details regarding your setup to make the question more complete.

When using:
251.18673-EAP-CANDIDATE-SNAPSHOT 2025-02-02 07:02:30 UTC 251.18673.52
my configuration works.

I can use the following:
org.jetbrains.yaml.YAMLFileType

in my code.

I have this in my grade.properties:

Supported build number ranges and IntelliJ Platform versions to https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild=251.17181.16
pluginUntilBuild=251.*
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#intellij-extension
platformType=IC

and this in my XML:

  <depends>com.intellij.modules.platform</depends>
  <depends>org.jetbrains.plugins.yaml</depends>
  <depends>com.intellij.modules.json</depends>
  <depends>com.intellij.tasks</depends>
  <depends>Git4Idea</depends>
....



 <fileIconProvider implementation="com.gafner.plugin.azd.extensions.AZDYamlIconProvider"/>

This is the build.gradle:

dependencies {
  intellijPlatform {
    create(providers.gradleProperty("platformType"), providers.gradleProperty("platformVersion"), useInstaller = false)
    bundledPlugins(providers.gradleProperty("platformBundledPlugins").map { it.split(',') })

I see some refactoring in the YAML code but I am not sure how that affects.

if you need more info let me know please

Do you have the org.jetbrains.plugins.yaml specified in the platformBundledPlugins Gradle property?

Yes sorry I though I added that part:

platformBundledPlugins=Git4Idea,org.jetbrains.plugins.yaml,com.intellij.tasks,com.intellij.modules.json

I tried also to add this:
bundledModule("org.jetbrains.plugins.yaml")
but it didn’t helped.

I also depend on org.jetbrains.plugins.yaml on plugin.xml and on the dependencies section of build.gradle.kts using bundledPlugins inside the intellijPlatform extension. The plugin verifier warned me about compatibility problems (see screenshot), however when I run with runIde task with the version specified, those classes can be found and my plugin works without issues. Previous verifications with EAP ran just fine without warnings or problems. I supposed maybe a temporary glitch?

Maybe it is this change here? It is named “do not export intellij.yaml.editing”, but this is where those classes are. I used them to add reference contributors in the regular YAML editor. So I wonder: Will it return? Should I use something different?

1 Like

Thanks for highlighting the issue. I figured out there’s an issue in the bundled plugins/modules definition and the module mentioned by @ahus1, intellij.yaml.editing, is not mentioned to be imported.

As a workaround, you can use:

dependencies {
  // ...
  intellijPlatform {
    bundledLibrary("plugins/yaml/lib/modules/intellij.yaml.editing.jar")
  }
}

Reported as IJPL-177264

1 Like

I tried this:

    bundledLibrary("plugins/yaml/lib/modules/intellij.yaml.editing.jar")

but it still doesn’t find the YAMLFileType - maybe I am missing something?

1 Like

Same here until I tried the following. Now it builds again.

bundledModule("intellij.yaml.editing")
4 Likes

Yes, that’d be an even cleaner way, thanks.

2 Likes

Thank you! This was driving me crazy yesterday and I wasn’t sure if I needed to report a bug against the platform or not.

After adding bundledModule("intellij.yaml.editing") the plugin builds and run,
but it still shows errors in the verification report.

2 Likes

Building against previous versions doesn’t work though:

java.lang.IllegalArgumentException: Specified bundledModule 'intellij.yaml.editing' doesn't exist.

When using in gradle.properties:

platformType = IC
platformVersion = 2024.1

Is this backwards compatible?

EDIT: for now I just wrapped it around an if based on the specific platformVersion.

The change in the YAML plugin modules structure is present since 2025.1
Therefore, the workaround is required only when targeting 2025.1 EAP – note that the further 2025.1 along with GA, should have that fixed, so the workaround should be removed.

This workaround is applied only to the IntelliJ Platform Gradle Plugin and building plugin part. Plugin Verifier (both local and the one in JetBrains Marketplace) will fail until the issue gets fixed in the IntelliJ Platform.

3 Likes

Hi @jakub.chrzanowski , once a new EAP version is released with a fix should we set the since from that version?
Is there a way to set also to previous EAP but excluding the buggy one?

Thanks

I’d like to suggest a possible preventive measure for this issue. Consider adding a verification step to the EAP release flow where previously validated plugins (those that passed verification in the prior EAP) are run through the plugin verifier. This automated test could help catch similar issues earlier in the process.

Thank you for considering this suggestion.

The fil will be present in both Plugin Verifier and IntelliJ Platform Gradle Plugin.
After upgrading to the latest Gradle plugin version, everything should work for all IntelliJ Platform releases.

The structure of the YAML plugin was changed again a bit, and the problem on the gradle plugin side shouldn’t appear in the recent 251.21418-EAP-CANDIDATE-SNAPSHOT builds. We’re working on supporting such structures properly in both the IntelliJ Platofrm Gradle Plugin and the Plugin Verifier.