# Bundled Rust bundled plugin not loaded in test environment

**URL:** <https://platform.jetbrains.com/t/bundled-rust-bundled-plugin-not-loaded-in-test-environment/4011>\
**Category:** IntelliJ Platform\
**Tags:** plugin-development\
**Created:** [April 6, 2026, 9:26am UTC](https://platform.jetbrains.com/t/bundled-rust-bundled-plugin-not-loaded-in-test-environment/4011 "2026-04-06T09:26:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![iFrostizz](https://sea1.discourse-cdn.com/flex001/user_avatar/platform.jetbrains.com/ifrostizz/32/2768_2.png) [@iFrostizz](https://platform.jetbrains.com/u/iFrostizz)\
**Post date:** [April 6, 2026, 9:26am UTC](https://platform.jetbrains.com/t/bundled-rust-bundled-plugin-not-loaded-in-test-environment/4011/1 "2026-04-06T09:26:55Z")

</div>

Hello,

I have started developing a simple plugin for RustRover (Should probably support any Intellij IDE with the Rust plugin in the future) which allows filtering out usages which are recognized as tests in the references window to remove visual bloat when doing code review. The branch I’m currently working on is `usages_unit_tests`.  
While writing tests to expand the capabilities of the plugin which can just read the #[test] at the nearest parent element that is a function, what seemed to be an easy task turned into something very complex. That’s my first Kotlin project and Intellij plugin so that’s probably the reason too.

Here is the test: [filter\_out\_rust\_tests/src/test/kotlin/NotRustTestsUsafeFilteringRuleProviderTest.kt at usages\_unit\_tests · iFrostizz/filter\_out\_rust\_tests · GitHub](https://github.com/iFrostizz/filter_out_rust_tests/blob/usages_unit_tests/src/test/kotlin/NotRustTestsUsafeFilteringRuleProviderTest.kt)  
It’s reading test data at: `src/test/testData/cfg_test.toml` and should assert that the usage at the `<caret>` location only has the usage in the `fn main()`, but not in the `fn some_helper()`which is part of the `#[cfg(test)]`.  
It’s relying on the bundled plugin `com.jetbrains.rust` to build the Rust lexical elements, and it’s going to need these Rust typed Psi elements to call the `isVisble()` on each usage. This way, it will be able to assert that the filtered out usages are the ones we expect.

The problem is that those Rust PsiElement types are not built, instead we have some plain text `PsiPlainTextImpl` etc types. And what’s strange is that `PluginManagerCore.isLoaded(PluginId.getId("com.jetbrains.rust"))` returns `false`, even after calling `PluginManagerCore.enablePlugin(PluginId.getId("com.jetbrains.rust"))`.

An “old” [Github issue](https://github.com/JetBrains/intellij-platform-gradle-plugin/issues/474) explained that the `platform-images` dependency had to be added, but that didn’t worked.

Any help is appreciated!

Thanks

---

<div class="post-metadata">

**Author:** ![Francois1](https://sea1.discourse-cdn.com/flex001/user_avatar/platform.jetbrains.com/francois1/32/2768_2.png) [@Francois1](https://platform.jetbrains.com/u/Francois1)\
**Post date:** [April 7, 2026, 3:11pm UTC](https://platform.jetbrains.com/t/bundled-rust-bundled-plugin-not-loaded-in-test-environment/4011/3 "2026-04-07T15:11:28Z")

</div>

The reason was that the `intellij.json.backend` module wasn’t loading. This was logged in the `idea.log` file, and because of this the `org.toml.lang` module wasn’t loading which made the `com.jetbrains.rust` disabled.  
The quirk though was to add those modules, but also the `intellij.json` as a bundled plugin.  
See: [filter\_out\_rust\_tests/build.gradle.kts at master · iFrostizz/filter\_out\_rust\_tests · GitHub](https://github.com/iFrostizz/filter_out_rust_tests/blob/master/build.gradle.kts)

---

<div class="post-metadata">

**Author:** ![yuriy.artamonov](https://sea1.discourse-cdn.com/flex001/user_avatar/platform.jetbrains.com/yuriy.artamonov/32/48_2.png) [@yuriy.artamonov](https://platform.jetbrains.com/u/yuriy.artamonov)\
**Post date:** [April 7, 2026, 5:27pm UTC](https://platform.jetbrains.com/t/bundled-rust-bundled-plugin-not-loaded-in-test-environment/4011/4 "2026-04-07T17:27:07Z")

</div>

We have such an important issue on our radars

> **[Allow bringing transitive dependencies via bundledModules to plugin build :...](https://youtrack.jetbrains.com/issue/IJPL-204313/Allow-bringing-transitive-dependencies-via-bundledModules-to-plugin-build)**
>
> Support transitive dependencies resolution for umbrella modules in "bundledModules" of \[intellij-gradle-plugin\](https://github.com/JetBrains/intellij-platform-gradle-plugin) Description: In IntelliJ Platform there is a...

Could you please upvote / watch it?
