Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

wire all implementations of given base trait/class

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
scala
領域
tooling

調査の方向性

リンクされている 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

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

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

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

softwaremill/macwire のほかの issue

softwaremill/macwire の issue をすべて見る

似ている issue

Scala の issue をもっと見る

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

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