fix(examples): make_code.py contradicts the documented UI import order
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 初心者へのやさしさ
- 85/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- python
調査の方向性
「UI Plugins」の docs/dev/plugins.md を python/examples/README.md と合わせて読み、その後 python/examples/make_code.py:10–11 の import を確認してください。例を更新し、ドキュメントに記載された import 順序に従いつつ、「Make Code」アクションと renderer の動作を維持してください。例がドキュメントに記載された順序を示せば完了です。この issue では、実行時エラーや修正の必要性は示されていません。
索引モデルが issue の本文から書いたものです。
説明
Summary
The make_code.py GUI plugin example imports PySide6.QtGui before binaryninjaui, reversing the order that the UI plugin guide tells Python UI plugins to always use. This report concerns the example's inconsistency with that guidance. It does not claim that this example crashes or that it loads an incorrect Qt library in a current installation.
Runtime or environment
- Binary Ninja source: latest published release
stable/6.0.10905, commit775c3b5eed8598217b20e1087afe7aa092a9b4b1; current default branchdev, commit74749a72a606532e3984b605518bd49094020699. - Edition, OS, OS version, CPU architecture: not applicable to this source/documentation comparison. No Binary Ninja runtime was executed for this report.
Steps to reproduce
- At either source baseline, read the Python UI plugin import-order rule in
docs/dev/plugins.md, under “UI Plugins.” - Read
python/examples/README.md, which listsmake_code.pyunder “GUI Plugins” and says these plugins require the UI to be running. - Compare the rule with the consecutive imports at
python/examples/make_code.py:10–11.
These source-inspection steps were performed on both baselines. No GUI or headless execution steps are asserted as reproduced.
Expected behavior
An official example identified as a Python GUI plugin demonstrates the import order documented for Python UI plugins: binaryninjaui before PySide6. The guide states this rule for UI plugins themselves; it does not document a GUI-context exemption.
Actual behavior
Both source baselines contain the same example bytes, including:
import sys
from PySide6.QtGui import QKeySequence
from binaryninjaui import UIActionHandler, UIAction, UIActionContext
The example is intended to run in the GUI. Whether binaryninjaui or the appropriate PySide bindings have already been imported in any particular GUI session was not measured. No resulting runtime failure, incorrect library selection, or crash is established here.
Evidence
- Expected source: UI Plugins guidance, which requires the opposite order for Python UI plugins.
- Failure source: make_code.py imports.
- Evidence provenance: static
- Local verification: static-proof
- Reproduction completeness: complete
Runtime reproduction was not run. This is a direct comparison of the release and default-branch source artifacts. The examples README identifies this file as a GUI plugin, establishing the scope of the documented convention. An AST inspection confirmed the consecutive import order in both source baselines. The proof establishes the example/guidance discrepancy only.
Restoration check
Compare this example with the UI plugin guide again: the example should demonstrate the documented import order, or the guidance should state an applicable supported exception. Preserve the example's “Make Code” action and renderer behavior. A successful comparison should not be presented as proof that a runtime crash has been fixed.
References
Issue #3196 introduced the UI plugin best-practice documentation and is closed as completed. This report concerns the example that still uses the contrary order, not missing best-practice documentation or a reproduced recurrence of an old crash.
Triage assessment
- Impact level: P3
- Assessment status: supported
- Impact basis: The official GUI plugin example contradicts an explicit documentation convention. This is an example consistency/cleanup defect; consequential runtime impact has not been demonstrated.
- Workaround status: available
- Workaround basis: Readers can follow the documented import order when adapting the example. The documented order is directly available in the same repository; no runtime fix or crash workaround is claimed.
- 主要言語
- C++
- スター
- 1.3k
- フォーク
- 304
- 平均マージ
- 2日 20時間
- マージ済み PR(30日)
- 10
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Vector35/binaryninja-api のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
Vector35/binaryninja-api#8715 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Vector35/binaryninja-api#8714 ·
メンテナーはふだん 2 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
Vector35/binaryninja-api#8689 ·
メンテナーはふだん 2 日以内に返信
-
Component: Python API
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
Vector35/binaryninja-api#8649 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Vector35/binaryninja-api#8621 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
Vector35/binaryninja-api の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
ESPresense/ESPresense#2680 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1時間未満 初心者へのやさしさ 75/100
stew675/llama-cpp-rdna-boosts#348 ·
メンテナーはふだん 1 日以内に返信
-
Documentation: Add comprehensive newcomer onboarding guide, project structure, and local usage to README対応中かも @Ash-Blanc が今日担当しました。 オープンarea/other status/bot-triaged status/need-triage
難易度 2/5 半日 初心者へのやさしさ 85/100
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信