Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Required modules of a plugin aren't automatically added to dependencies by 'bundledPlugins' #1883

Closed
chashnikov opened this issue Feb 12, 2025 · 0 comments · Fixed by #1884
Closed
Assignees
Labels
Milestone

Comments

@chashnikov
Copy link
Member

What happened?

If a plugin has a module marked as required, its JAR may not be added to the compilation classpath automatically when dependency on the plugin is added in build.gradle.kts.

(This issue was moved from IJ Platform Issue tracker: IJPL-177264.)

Relevant log output or stack trace

Steps to reproduce

Configure the following dependencies:

dependencies {
    intellijPlatform {
        intellijIdeaCommunity("251.20015.29-EAP-SNAPSHOT", useInstaller = false)
        bundledPlugin("org.jetbrains.plugins.yaml")
    }
}

org.jetbrains.yaml.YAMLFileType reference in code won't be resolved. Adding explicit bundledModule("intellij.yaml.editing") fixes the problem.

This happens because the class belongs to a module in the YAML plugin which is marked as required, but it isn't added to the classpath automatically.

Gradle IntelliJ Plugin version

2.2.1

Gradle version

8.5

Operating System

None

Link to build, i.e. failing GitHub Action job

No response

@chashnikov chashnikov added the bug label Feb 12, 2025
@chashnikov chashnikov self-assigned this Feb 12, 2025
chashnikov added a commit that referenced this issue Feb 12, 2025
…'bundledPlugins' is used (#1883)

A content module registered as 'required' or 'embedded' in the plugin descriptor is guaranteed to be loaded if the plugin itself is loaded. Since 'depends' tag adds classloaders from all content modules as parent classloaders, references to classes from such modules will be resolved at runtime.
chashnikov added a commit that referenced this issue Feb 12, 2025
…'bundledPlugins' is used (#1883)

A content module registered as 'required' or 'embedded' in the plugin descriptor is guaranteed to be loaded if the plugin itself is loaded. Since 'depends' tag adds classloaders from all content modules as parent classloaders, references to classes from such modules will be resolved at runtime.
@hsz hsz closed this as completed in #1884 Feb 13, 2025
hsz pushed a commit that referenced this issue Feb 13, 2025
…'bundledPlugins' is used (#1883)

A content module registered as 'required' or 'embedded' in the plugin descriptor is guaranteed to be loaded if the plugin itself is loaded. Since 'depends' tag adds classloaders from all content modules as parent classloaders, references to classes from such modules will be resolved at runtime.
@hsz hsz added this to the next milestone Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants