macwire fails to find lazy vals for injection if there is a block comment above them in the publish phase
まだ誰も着手していません。
評価
調査の方向性
リンクされた macwire-bug-demonstration リポジトリを使用して、macwire 0.7.1 と Scala 2.11.2 で失敗を再現する。通常のコンパイルと publish を比較し、Hello.scala に対する macwire のデバッグ出力を調査する。ドキュメント化されたブロックコメントによって publish 中にサービスが見つからなくなることがなくなり、既存のインジェクションが引き続きコンパイルできれば完了とする。
索引モデルが issue の本文から書いたものです。
説明
This is using macwire 0.7.1 and scala 2.11.2.
When we have a code block like this:
/**
* some comment what this service does.
*/
lazy val service: Service = MyService
as part of the dependencies, then
- compiling normally works as expected
- the publish command, which re-compiles everything, fails to find
servicein the compilation phase.
The reason is the block comment which seems to interfere with the macros somehow. When the block comment is deleted everything works as expected. Still, this bug is rather annoying when wanting to publish a well-commented library....
publish
[info] Packaging /Users/joe/Documents/git/brokenMacwireParsing/target/scala-2.11/brokenmacwireparsing_2.11-1.0-sources.jar ...
[info] Done packaging.
[info] Packaging /Users/joe/Documents/git/brokenMacwireParsing/target/scala-2.11/brokenmacwireparsing_2.11-1.0.jar ...
[info] Main Scala API documentation to /Users/joe/Documents/git/brokenMacwireParsing/target/scala-2.11/api...
[info] Wrote /Users/joe/Documents/git/brokenMacwireParsing/target/scala-2.11/brokenmacwireparsing_2.11-1.0.pom
[info] Done packaging.
[info] :: delivering :: brokenmacwireparsing#brokenmacwireparsing_2.11;1.0 :: 1.0 :: release :: Fri Oct 10 17:04:11 CEST 2014
[info] delivering ivy file to /Users/joe/Documents/git/brokenMacwireParsing/target/scala-2.11/ivy-1.0.xml
[debug] Trying to find parameters to create new instance of: [com.example.Hello]
[debug] Trying to find value [service] of type: [com.example.Service]
[debug] Looking in the enclosing method
[debug] Looking in the enclosing class/trait
[debug] Checking def: [$init$]
[debug] Checking val: [hello]
[debug] Looking in parents
[debug] Checking parent: [AnyRef]
[error] /Users/joe/Documents/git/brokenMacwireParsing/src/main/scala/com/example/Hello.scala:18: Cannot find a value of type: [com.example.Service]
[error] lazy val hello: Hello = wire[Hello]
[error]
See the specially created repo reproducing this bug here, including macwire debug output:
- 主要言語
- Scala
- スター
- 1.3k
- フォーク
- 77
- 平均マージ
- 9分
- マージ済み PR(30日)
- 4
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
softwaremill/macwire のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
softwaremill/macwire#412 · コメント 3 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
softwaremill/macwire#391 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
softwaremill/macwire#301 · コメント 2 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
softwaremill/macwire#281 · コメント 5 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
softwaremill/macwire#278 · コメント 3 件 ·
softwaremill/macwire の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
ergoplatform/ergodocs#614 ·
-
area:ci enhancement requires-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
apache/datafusion-comet#6078 ·
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
bug delta-datalayout flink
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100