[environment] unified-init 宏 在 rust-analyzer 展开时报错

unified-init 宏的循环展开的错误:

ERROR rust_analyzer::main_loop: FetchBuildDataError:

error: the --keep-going flag is unstable, pass -Z unstable-options to enable it

See Tracking issue for `--keep-going` · Issue #10496 · rust-lang/cargo · GitHub for more information about the --keep-going flag.

ERROR project_model::workspace: cyclic deps: intertrait_macros(Idx::(64)) → intertrait(Idx::(54)), alternative path: intertrait(Idx::(54)) → intertrait_macros(Idx::(64))

ERROR project_model::workspace: cyclic deps: unified_init_macros(Idx::(142)) → unified_init(Idx::(140)), alternative path: unified_init(Idx::(140)) → unified_init_macros(Idx::(142))

1 个赞

我也遇到过这个问题,我还以为是我这边环境的问题,换了两个系统都会

感觉也有可能是RA的问题,因为编译是没有问题的

RA reports errors but compile succeeds - Editors and IDEs - The Rust Programming Language Forum (rust-lang.org)

尝试把RA回退到1个月之前的版本试试?(他可以安装指定的版本)

1 个赞

你们解决了吗?我有时候会遇到这个问题,但是make clean之后又好了

问题可能是mini-backtrace这个库,依赖项版本没有指定特定版本,然后导致check不过(vscode output往上翻翻看到的)

1 个赞

问题应该是,ra的版本太新,在cargo check的时候自动加了–keep-going参数,而我们工具链太旧,–keep-going在我们这个版本还是unstable的。
然后如果回退ra到v0.3.1916版本,就不会出错。

1 个赞