wire all implementations of given base trait/class
まだ誰も着手していません。
評価
調査の方向性
リンクされている wireSet を使った multi-wiring の例から始め、既存の wireSet API を調べます。wireAll[Base] エントリーポイントが、後から追加された実装も含め、すべての非抽象実装をどのように検出してインスタンス化すべきかを明らかにします。RockBand の例が各実装を列挙せずに完全なコレクションを取得できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
building on the example of multi-wiring via wireSet would it be possible to achieve this:
trait Musician
class RockBand(musicians: Iterable[Musician])
class Singer extends Musician
class Guitarist extends Musician
class Drummer extends Musician
class Bassist extends Musician
trait RockBandModule {
lazy val musicians: Iterable[Musician] = wireAll[Musician] // all above musicians classes will be instantiated
lazy val rockBand = wire[RockBand]
}
namely: have a wireAll[Base] method to instantiate all non-abstract classes derived from Base
it would be handy not to have to list all implementations (as in the wireSet example) of given trait and have it wired automatically so in case you add more implementations they will be added to the collection without any modifications to the module code
- 主要言語
- Scala
- スター
- 1.3k
- フォーク
- 77
- 平均マージ
- 9分
- マージ済み PR(30日)
- 4
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
softwaremill/macwire のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
softwaremill/macwire#412 · コメント 3 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
softwaremill/macwire#391 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
softwaremill/macwire#301 · コメント 2 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
softwaremill/macwire#281 · コメント 5 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
softwaremill/macwire#278 · コメント 3 件 ·
softwaremill/macwire の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
typelevel/sbt-typelevel#929 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
softwaremill/tapir#5542 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
lichess-org/lila#21793 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
apache/pekko-projection#635 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100