[Suggestion] Refactor mx.py, source file too large
まだ誰も着手していません。
評価
調査の方向性
まず mx.py を読み、既存の mx_[xxx].py モジュールとその構造を比較します。列挙されている関心事項(ビルドとテストのタスク、バージョン管理機能、依存関係の解決、ディストリビューション、IDE サポート)を使って、個別のモジュールに分ける境界を提案します。完了の条件は、レビュー済みのリファクタリング計画、または動作を変更せずに mx.py を小さくする段階的な変更です。
索引モデルが issue の本文から書いたものです。
説明
mx.py is growing rapidly and with this can be unreadable over time.
IDEs like IntelliJ/PyCharm are slowing down parsing the contents. Besides that its best to separate the different aspects of mx.py into separate source files/modules of their own, just like the other mx_[xxx].py files out there.
I glanced through the code and here are some of the high-level parts we could split mx.py into:
- high-level tasks i.e. build, test, benchmark, etc...
- git related functionality
- hg related functionality
- code blocks that split tasks into processes for multi-processing
- suite related functionality (Creation and other management tasks)
- dependency resolution related functionality
- maven & dependency resolution related functionality
- gradle & dependency resolution related functionality
- distribution related functionality
- IDE related functionality
- others...
Please make your own suggestions on how you would best like it to be split, but from the current layout of the classes and methods in it, the above was apparent but maybe a better design is inherent and I'm not seeing it immediately.
A good rule to keep such important files lean: only have high-level implementations that outline what the program does, and the how it does it (i.e. implementation parts) would be best to encapsulate elsewhere via Packages, Modules, Classes, etc... This would make it easier to read and change, especially to debug when things break.
I'm happy to slowly refactor it and create PRs for individual concerns - let me know if this is okay and I will create a simple PR to start with?
- 主要言語
- Python
- スター
- 205
- フォーク
- 131
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
graalvm/mx のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
-
Error while doing maven-install再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 30/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
pdm-project/pdm#4042 ·
メンテナーはふだん 1 日以内に返信
-
change relation
難易度 1/5 1時間未満 初心者へのやさしさ 76/100
globalwordnet/english-wordnet#1467 ·
メンテナーはふだん 1 日以内に返信
-
pr-babysit: the validator reports only the hex part of the harvest fingerprint, so a launch stops review-report-unusable対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンfollow-up
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
521xueweihan/HelloGitHub#4618 ·