IntelliJプラグインのAnActionと登録設定を実装・変更し、表示文言やアイコンの定義、非同期処理の起動方法を整えます。
- IDEに新しいアクションを追加したいとき
- アクションの登録やアイコンを変更したいとき
- 表示名と説明文の定義を整理したいとき
IntelliJのJPSテストモジュールをBazelへ移行し、Bazelだけで起きる失敗を依存関係や実行環境から切り分ける手順を案内します。
Migrate IntelliJ JPS module tests to Bazel; debug Bazel-only failures.
実行スコア 未検証
インストール方法を見るIntelliJのJPSテストモジュールをBazelで実行できるように移行する際の手順と、Bazel環境だけで起きる失敗の調査方法をまとめています。まず実際のテストモジュールとBazelラベルを特定し、.imlを依存関係の基準として変更したうえで、生成されたBUILD.bazelを再生成・確認します。コンパイル時の依存不足、実行時に見つからないクラスやリソース、プラグイン登録、テストデータ、runfilesの問題など、症状ごとの確認先と修正方針を示します。JPSとBazelの違いや、TeamCityでの遅延・タイムアウトの切り分けも扱います。テストの除外やアサーション変更で失敗を隠さず、対象を絞った実行から移行先全体の検証へ進む流れを確認できます。
既存のJPSテストをBazelへ移したいときや、Bazelでのみテストが失敗して原因を絞れないときに向いています。依存関係やプラグイン、テストデータの設定を見直し、移行が完了したか確認する際にも使えます。
記載の移行・検証手順にはBazelコマンドやリポジトリ内のビルドスクリプトが必要です。
この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Use this skill when switching an IntelliJ JPS test module to Bazel, fixing a Bazel-only test failure, or reviewing migration wiring.
Identify the real test module and Bazel label.
@community//....//....Treat .iml as the source of truth.
.iml first.scope="TEST" for new test-only dependencies.RUNTIME only when the dependency must be present as a runtime plugin/resource/classpath entry and TEST is not enough.BUILD.bazel sections except for intentionally custom jps_test sections protected by ### skip generation section.Regenerate after every .iml or BUILD.bazel metadata change.
community/tools/bun.cmd build/jps-module.mjs register path/to/module.iml --fix-iml-eof
./build/jpsModelToBazel.cmd
./bazel.cmd test --cache_test_results=no @community//path/to/package:target_test
For a community-only module in a standalone community checkout, run the same package as //path/to/package:target_test.
jps_test sections at the top when a module already needs custom test options.### skip generation section `test module.name`
tags, timeout, env, jvm_flags, and data.community/build/bazel-migrated-test-modules.txt only after the target is fully migrated and verified. The community JPS aggregator then skips the module, and tests.cmd refuses it. The file documents its format.copy_file to patch missing jars or descriptors into runfiles. Prefer normal .iml dependencies, target runtime/data dependencies, or the existing shared mechanism for that class of test.Use the smallest dependency that matches what failed:
.iml.jps_test.data or ensure the existing generator includes it; do not rely on source-tree paths under Bazel.Before changing tests, verify whether the failure is really a test assertion issue or just missing runtime/plugin/testdata wiring.
Check that test classes are in the generated *_test_lib, the Bazel target points to that test library, and the class names match the runner convention. If the module truly has no tests, there may be nothing to migrate.
Search for the extension/action/inspection id and identify the descriptor that registers it. Add the owning plugin/module dependency. Do not manually register production extensions in test setup unless the test is explicitly about a local fake extension.
Example: an action registered into EditorGutterVcsPopupMenu needs the VCS implementation descriptor that owns that group, not just VCS API classes.
If plugin A registers an action into a group contributed by plugin/module B, plugin A must depend on B or move the action registration into a B-aware optional/content descriptor. Fix the descriptor dependency when production loading is also inconsistent; fix the test dependency only when the test product intentionally omits an otherwise valid product plugin.
When integration tests invoke JPS compilation, failures like missing JPS jars or compile-server plugin classpaths usually mean Bazel runfiles cannot resolve a plugin/module path the same way JPS does.
If code expects Bazel-only properties such as target mappings or runfiles metadata, pass them through the jps_test target using the established option (jvm_flags, env, or data) and add the backing file to runfiles.
Re-check labels, repo mappings, and generated runfiles. A target can pass as @community//... from Ultimate and fail as //... in standalone community if the test relies on parent-repo runfiles or missing repo mapping.
Look for the first expensive operation under Bazel: indexing, plugin loading, coroutine dispatch, first service initialization, or filesystem/runfiles traversal. Prefer moving one-time initialization to setup or making the test wait for the actual condition. Avoid raising timeouts as the first fix.
Keep test edits minimal.
BUILD.bazel.idea.log, test.log, and JUnit XML if present..iml files.runtime_deps, deps, data, env, and jvm_flags..iml or plugin descriptors.--cache_test_results=no.git diff --check before finishing.A module is migrated only when:
--cache_test_results=no;BUILD.bazel matches .iml;まだレビューはありません。使ってみた感想をお寄せください。
ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。
まだコメントはありません。最初のコメントを書いてみませんか。
IntelliJプラグインのAnActionと登録設定を実装・変更し、表示文言やアイコンの定義、非同期処理の起動方法を整えます。
IntelliJのKotlin・Javaコードを新規作成やレビューする際に、言語の選び方、書式、型の扱い、例外処理などのプロジェクト規約に沿って整えるスキルです。
IntelliJ向けの変更を適切な単位に分け、チケットの有無に応じた形式で、理由や判断も伝わるコミットメッセージを作成・修正するスキルです。
Pythonコードの型推論や型エラーを複数の型チェッカーで比較し、各ツールの判定と診断内容をまとめたレポートを作成します。
Compose Desktopの画面で状態や副作用をどこに持たせるか整理し、表示と判断の境界、再利用部品やリストの設計を整えます。
Compose DesktopのUIコードを読み、状態管理、画面構成、副作用、コルーチン、再描画の性能など、設計と実行時の問題を具体例とともに監査するスキルです。