PathOfBuildingCommunity / PathOfBuildingCommunity/PathOfBuilding

Convert GlobalCache to its own class

オープン
#2,385 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

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

  1. Make the functions more generic (e.g. for mergeDB here, have it be mergeTables and call it twice for conditions and multipliers)
  2. Move the functions to a separate file specifically for managing the GlobalCache (might be worth turning GlobalCache into a proper OO class potentially)
  3. 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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず Common.lua にある GlobalCache 固有の関数を監査し、それらの呼び出し箇所を追跡します。設計を選択する前に、提案されている3つの方向性—汎用ヘルパー、専用の GlobalCache ファイルまたはクラス、単一用途の関数のローカライズ—を比較します。既存の動作を変更せずに責務が分離されていれば完了ですが、この issue では具体的な受け入れテストは定義しません。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
lua
領域
tooling
issue の種類
リファクタリング
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。