简体   繁体   English

日志仅涉及“分散隐式扩展”

[英]Log implicits only for “diverging implicit expansion”s

Other answers suggest using "-Xlog-implicits" option for debugging "diverging implicit expansion" errors. 其他答案建议使用"-Xlog-implicits"选项来调试“发散隐式扩展”错误。 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? 有没有办法限制它只能解释产生编译错误的地方?

If there were such an option, one might have seen it in use here: 如果有这样的选择,可能会在这里看到它的使用:

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

But the tool of choice seems to be grep: 但选择的工具似乎是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. 由于该领域正在积极开发中,现在可能是提交增强请求的时候了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM