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

Migrate plugin to new plugin model #8709

Merged
merged 5 commits into from
May 1, 2022
Merged

Migrate plugin to new plugin model #8709

merged 5 commits into from
May 1, 2022

Conversation

Undin
Copy link
Member

@Undin Undin commented Apr 1, 2022

A short description of the new plugin model (AKA plugin model v2) can be found here

The main idea of the new plugin model is to convert a big plugin with "optional dependencies" into a graph of small plugins with explicit dependencies between them (of course, in UI there is still only one plugin). It should simplify making plugin dynamic unloadable (in theory).

In practice, these changes allow us to rely on all dependencies of modules (where module is "optional dependency" in plugin model v1) and avoid issues like #8622

From a user point of view, these changes allow users to install Rust and Toml at the same time dynamically, i.e. without IDE restart. Previously, it was possible if Toml plugin was already installed

Depends on #8708

changelog: internal: Migrate plugin to new plugin model. feature: Allow installing Rust plugin together with Toml plugin without IDE restart. Note, Rust plugin update still requires IDE restart

@Undin Undin added the internal Pull requests about internal improvements/fixes that don't affect users directly label Apr 1, 2022
@Undin Undin force-pushed the undin/new-plugin-model branch 2 times, most recently from 9b428a8 to b6c0eb4 Compare April 2, 2022 15:50
@Undin Undin requested a review from artemmukhin April 4, 2022 06:37
@Undin Undin force-pushed the undin/new-plugin-model branch 2 times, most recently from 3e548a5 to 5d43aa7 Compare April 8, 2022 06:02
@Undin Undin marked this pull request as ready for review April 8, 2022 07:05
Plugin model v2 requires all plugin manifest are located in single jar file
Otherwise, the platform throws exception because of usage of package of another module (`org.rust.debug`)
The plugin has to declare additional dependency to `intellij.profiler.clion` CLion module to use profiler classes because of using new plugin model.
Otherwise, the platform throws exception during loading classes from `intellij.profiler.clion`.

These changes extract all profiler code into separate Gradle module to provide separate plugin module manifest with necessary dependency.
Also, it allows us not to make unnecessary connection between common CLion code and profiler integration
The hack was introduced in #8666.
Now the platform properly checks dependencies of modules (optional dependencies in plugin model v1) so we can drop it
@Undin Undin added the feature label May 1, 2022
@Undin
Copy link
Member Author

Undin commented May 1, 2022

bors r=vlad20012

@bors
Copy link
Contributor

bors bot commented May 1, 2022

Build succeeded:

@bors bors bot merged commit 6c6d2dc into master May 1, 2022
@bors bors bot deleted the undin/new-plugin-model branch May 1, 2022 23:20
@github-actions github-actions bot added this to the v170 milestone May 1, 2022
@mili-l mili-l self-assigned this May 11, 2022
bors bot added a commit that referenced this pull request Sep 3, 2022
9295: GRD: fix searchable options building r=Undin a=Undin

Building of searchable options was broken by migration to new plugin model (#8709).
As a result, `Find Action` dialog and settings search cannot find options provided by the plugin.

These changes fix Gradle `buildSearchableOptions` task

| Before | After |
| - | - |
| <img width="716" alt="Screenshot 2022-09-03 at 17 17 07" src="https://user-images.githubusercontent.com/2539310/188277053-c0333e4c-cb54-4dcb-adf8-d0cd796e2bd0.png"> | <img width="716" alt="Screenshot 2022-09-03 at 17 07 17" src="https://user-images.githubusercontent.com/2539310/188277059-5ece0e97-4905-4dc6-ae67-c3324f1e11fe.png"> |
| <img width="1012" alt="Screenshot 2022-09-03 at 17 17 17" src="https://user-images.githubusercontent.com/2539310/188277069-7002bcd7-33c0-4873-9e89-5869a04fa9d4.png"> | <img width="1094" alt="Screenshot 2022-09-03 at 17 07 43" src="https://user-images.githubusercontent.com/2539310/188277081-3a591d24-9eff-4f2a-90c2-941477873178.png"> |

changelog: Fix search of the plugin settings in `Find Action` dialog and `Settings` window which was broken in [#8709](#8709)


Co-authored-by: Arseniy Pendryak <a.pendryak@yandex.ru>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature internal Pull requests about internal improvements/fixes that don't affect users directly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants