softwaremill / softwaremill/macwire

Documentation - lazy factory?

Open
#63 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
1.3k
Forks
77
Avg merge
9m
Merged PRs (30d)
4

Description

I've seen this in the README and the DI guide:

lazy val factory = (arg: Arg) => wire[Stuff]

I don't see the point of making this factory lazy?
Shouldn't the documentation recommend this instead?

val factory = (arg: Arg) => wire[Stuff]

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the lazy factory examples in the README and DI guide, then compare the documented lazy and non-lazy forms against the issue's question. Confirm which form should be recommended and update both documentation locations consistently; done means the examples clearly explain or avoid the unnecessary laziness.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.