Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Log implicits only for "diverging implicit expansion"s

Other answers suggest using "-Xlog-implicits" option for debugging "diverging implicit expansion" errors. However, it also logs a lot of implicits in places unrelated to these errors. Is there some way to limit it to only explain places which produce compilation errors?

like image 847
Alexey Romanov Avatar asked Dec 13 '13 12:12

Alexey Romanov


1 Answers

If there were such an option, one might have seen it in use here:

https://github.com/scala/scala/pull/3669

But the tool of choice seems to be grep:

scalac -Xlog-implicits test/files/neg/t2031.scala 2>&1 | grep diverg 

Since that area is under active development, now might be the time to submit a request for enhancement.

like image 160
som-snytt Avatar answered Sep 29 '22 14:09

som-snytt