PathOfBuildingCommunity / PathOfBuildingCommunity/PathOfBuilding
Convert GlobalCache to its own class
オープン
まだ誰も着手していません。
technical
- 主要言語
- Lua
- スター
- 5.4k
- フォーク
- 2.4k
- 平均マージ
- 1日 12時間
- マージ済み PR(30日)
- 26
説明
In general, Common.lua should be for functions that can be used on any table or number or other type. Many of these functions there are very specific to the GlobalCache. A few options I'd rather see
- Make the functions more generic (e.g. for
mergeDBhere, have it bemergeTablesand call it twice for conditions and multipliers) - Move the functions to a separate file specifically for managing the GlobalCache (might be worth turning GlobalCache into a proper OO class potentially)
- Some of the functions are only used in one place. It might be better off having those functions in the file that uses them either as a local function or a function defined in that file instead of polluting the global namespace
Originally posted by @Wires77 in https://github.com/PathOfBuildingCommunity/PathOfBuilding/pull/2294#discussion_r602679854
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず Common.lua にある GlobalCache 固有の関数を監査し、それらの呼び出し箇所を追跡します。設計を選択する前に、提案されている3つの方向性—汎用ヘルパー、専用の GlobalCache ファイルまたはクラス、単一用途の関数のローカライズ—を比較します。既存の動作を変更せずに責務が分離されていれば完了ですが、この issue では具体的な受け入れテストは定義しません。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- lua
- 領域
- tooling
- issue の種類
- リファクタリング
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100