Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

整理: MetasStoreCoreManager を内蔵 #1314

Closed
wants to merge 3 commits into from

Conversation

tarepan
Copy link
Contributor

@tarepan tarepan commented May 23, 2024

内容

概要: MetasStoreCoreManager を内蔵してリファクタリング

MetasStore はキャラクター情報の一部を管理するクラスである。一部とはエンジンに由来する部分である。
キャラクター情報の全部へアクセスするには core が必要であり、MetasStore.load_combined_metas() は CoreAdapter インスタンスを引数に受け取って情報統合しキャラクター情報全部を返している。
昨今リファクタリングが進み、新しく実装された CoreManager を用いたコアアクセスの単純化が可能になった。 MetasStore であれば init で CoreManager を渡し、情報取得時にコアバージョンのみ指定すればよくなる。

このような背景から、MetasStoreCoreManager を内蔵するリファクタリングを提案します。

関連 Issue

part of #1313

@tarepan tarepan requested a review from a team as a code owner May 23, 2024 18:32
@tarepan tarepan requested review from Hiroshiba and removed request for a team May 23, 2024 18:32
Copy link
Member

@Hiroshiba Hiroshiba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

違和感ある依存に感じました!
MetasStoreが真に依存したいのはCoreのメタ情報だけなはずで、CoreManagerを抱えるのは過剰気味な気配を感じました。

コード追ってたのですが、load_combined_metasに渡すのはlist[CoreSpeaker]が良いかもです!(消されてるFIXMEコメントにも書いてありそう)
それにはまず_CoreSpeakerというどう考えてもコア側にあるべき概念をMetasStoreからCoreAdapter.speakers辺りに持っていくとスムーズかもです。

逆にそこまで進んだら割とリファクタリング方針は明確になって、router側でcore.metas.speakersを得てload_combined_metasに渡す感じになる気がします。
まあそうなってくるとload_combined_metasという名称は変かもなのですが。

ちょっと一旦コメントまで・・・!

@tarepan
Copy link
Contributor Author

tarepan commented May 29, 2024

👍️
提案頂いた方向性で新たな PR を作成しました(#1352)。
#1352 を確認頂いて、そちらが良さそうであればこの PR は close とします。

@tarepan
Copy link
Contributor Author

tarepan commented Jun 2, 2024

#1352 merge につき本 PR は close とします。

@tarepan tarepan closed this Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants