本文介绍了新式(“内联")宏需要 scala.meta的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我刚刚更新到 scala meta 2.0.0-M1 和最新的 scala 2.12.3,现在宏不再编译.我所做的唯一更改是将元版本从 1.8.0 更改为 2.0.0-M1.

I just updated to scala meta 2.0.0-M1 and with the latest scala 2.12.3 and now macros no longer compile. The only change i made was to change the meta version from 1.8.0 to 2.0.0-M1.

错误:新样式(内联")宏需要 scala.meta

ERROR: new-style ("inline") macros require scala.meta

有人知道是否有快速解决方法吗?

Does anybody know if there is a quick work around for this?

我希望开始尝试一些语义改进.

I was hoping to start playing with some of the semantic improvements.

推荐答案

scalameta/paradise 目前仅支持 scalameta 1.8.0,不支持 2.0.0-M1.宏注释无法访问语义 api 中的新改进.

scalameta/paradise currently supports scalameta 1.8.0 only, not 2.0.0-M1. The new improvements in the semantic api are not accessible for macro annotations.

进行语义改进的一个好地方是实现自定义 scalafix 重写https://scalacenter.github.io/scalafix/#scalacenter/scalafix.g8

One good place to play around with the semantic improvements is to implement custom scalafix rewrites https://scalacenter.github.io/scalafix/#scalacenter/scalafix.g8

这篇关于新式(“内联")宏需要 scala.meta的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 22:11