"value x$2" when wiring a parametrised type
@mbore is already working on this.
Since Mar 22, 2022.
Assessment
This issue has not been assessed yet.
Description
Using PrometheusMetrics[IO] as a dependency causes problems when compiling bootzooka:
[error] Error while emitting Dependencies.scala
[error] value x$2
[error] one error found
As a work-around, the dependency is created by hand: https://github.com/softwaremill/bootzooka/blob/tapir-update/backend/src/main/scala/com/softwaremill/bootzooka/Dependencies.scala#L36 (note that this is currently on a branch)
To reproduce, change the Dependencies class to:
object Dependencies {
def wire(
config: Config,
sttpBackend: Resource[IO, SttpBackend[IO, Any]],
xa: Resource[IO, Transactor[IO]],
clock: Clock
): Resource[IO, Dependencies] = {
def buildHttpApi(
http: Http,
userApi: UserApi,
passwordResetApi: PasswordResetApi,
versionApi: VersionApi,
prometheusMetrics: PrometheusMetrics[IO],
cfg: HttpConfig
) = {
new HttpApi(
http,
userApi.endpoints concatNel passwordResetApi.endpoints,
NonEmptyList.of(prometheusMetrics.metricsEndpoint, versionApi.versionEndpoint),
prometheusMetrics,
cfg
)
}
autowire[Dependencies](
config.api,
config.user,
config.passwordReset,
config.email,
DefaultIdGenerator,
PrometheusMetrics.default[IO](registry = CollectorRegistry.defaultRegistry),
clock,
sttpBackend,
xa,
buildHttpApi _,
new EmailService(_, _, _, _, _),
EmailSender.create _,
new ApiKeyAuthToken(_),
new PasswordResetAuthToken(_)
)
}
}
- 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
-
module: unknown type: bug/reported
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OpenXiangShan/XiangShan#6623 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
ergoplatform/ergodocs#614 ·
-
area:ci enhancement requires-triage
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
apache/datafusion-comet#6078 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100