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

Incremental Build Fails - Cannot Find Implementation

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
scala
領域
backend

調査の方向性

まず Play アプリケーションでインクリメンタルビルドを再現し、次に Global.scala:41 と併せて InstanceLookup.scala:13 と Wired.scala:10 を調査します。報告されたスタックフレームにあるクラスローダーを比較します。ビルド出力を削除したり完全なリビルドを強制したりせずに、controller クラスを追加または削除すると解決する状態になれば完了です。

索引モデルが issue の本文から書いたものです。

説明

MacWire Version: 2.11-2.2.0
Play! Version: 2.11-2.3.10

The incremental compilation fails when adding/removing a class file with:

java.lang.RuntimeException: Cannot find implementations of class class controllers.FooBarGong!
at com.softwaremill.macwire.InstanceLookup$class.lookupSingleOrThrow(InstanceLookup.scala:13) ~[util_2.11-2.2.0.jar:2.2.0]
at com.softwaremill.macwire.Wired.lookupSingleOrThrow(Wired.scala:10) ~[util_2.11-2.2.0.jar:2.2.0]
at Global$.getControllerInstance(Global.scala:41) ~[na:na]
...

Resolution succeeds provided I delete the build output folder do a complete project rebuild.

Upon further investigation, I have learned of an inconsistent classloader state between stack frames as indicated by calling the following from the subject stack frame:

((ClassLoader)this.getClass().getClassLoader()).loadClass("controllers.FooBarGong")

Lookup succeeds from stack frame Global$.getControllerInstance(Global.scala:41) ~[na:na] (class loader ReloadableClassLoader(v1)) but fails to find the class from the deeper stack frame com.softwaremill.macwire.Wired.lookupSingleOrThrow(Wired.scala:10) (class loader PlayDependencyClassLoader)

The call site is fairly simple:

package modules

import play.api.Play
import play.api.libs.ws.WS

import controllers._

import com.softwaremill.macwire._
import services._

object ApplicationModule extends ControllerModule with ServiceModule

trait ControllerModule extends ServiceModule {
  import Play.current

  lazy val fooBarGongController = wire[FooBarGong]
}
主要言語
Scala
スター
1.3k
フォーク
77
平均マージ
21時間 6分
マージ済み PR(30日)
1

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

softwaremill/macwire のほかの issue

softwaremill/macwire の issue をすべて見る

似ている issue

Scala の issue をもっと見る

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

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