wire all implementations of given base trait/class
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start with the linked multi-wiring via wireSet example and inspect the existing wireSet API. Determine how a wireAll[Base] entry point should discover and instantiate all non-abstract implementations, including implementations added later. Done means the RockBand example can obtain the complete collection without listing each implementation.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Scala
- Stars
- 1.3k
- Forks
- 77
- Avg merge
- 9m
- Merged PRs (30d)
- 4
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from softwaremill/macwire
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
softwaremill/macwire#412 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
softwaremill/macwire#391 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
softwaremill/macwire#301 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
softwaremill/macwire#281 · 5 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
softwaremill/macwire#278 · 3 comments ·
All issues in softwaremill/macwire
Similar issues
-
Area: Excel support
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
orbeon/orbeon-forms#7893 ·
-
ShuffleManagerRegistry.register recursion guard is inverted, permits GlutenShuffleManager subclasses Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 1/5 Under an hour Newbie friendliness 70/100