我们正在尝试创建也使用Spark的Scala项目,但在读取扩展文件‘intellij_info_bundled.bzl’时遇到错误:没有这样的包'@intellij_aspect//':在C:/users//_bazel_user/i45wuf6d/external/intellij_aspect.中找不到工作区文件它是否在Intellij中缺失了什么?
Scala文件
包src.main.scala
object HelloWorld extends App {
def main(args: Array[String]) {
println("Hello, world!")
}}
构建文件
package(default_visibility = ["//visibility:public"])
load("@io_bazel_rules_scala//scala:scala.bzl", "scala_library", "scala_test")
scala_library(
name = "hello-world",
srcs = glob(["src/main/scala/*.scala"]),
)
scala_test(
name = "Hello_test",
srcs = glob(["src/main/scala/*.scala"]),
size = "small", # Expect this test to run quickly
)
工作空间
workspace(name = "scala_example")
rules_scala_version="7522c866450cf7810eda443e91ff44d2a2286ba1" # update this as needed
http_archive(
name = "io_bazel_rules_scala",
url = "https://github.com/bazelbuild/rules_scala/archive/%s.zip"%rules_scala_version,
type = "zip",
strip_prefix= "rules_scala-%s" % rules_scala_version
)
load("@io_bazel_rules_scala//scala:scala.bzl", "scala_repositories")
scala_repositories()`enter code here`
# register default scala toolchain
load("@io_bazel_rules_scala//scala:toolchains.bzl", "scala_register_toolchains")
scala_register_toolchains()
来自控制台的命令和错误
命令: C:\ProgramData\chocolatey\bin\bazel.exe build --tool_tag=ijwb:IDEA:community --keep_going --curses=no --color=yes -- terminal_ui=no --progress_in_terminal_title=no --aspects=@intellij_aspect//:intellij_info_bundled.bzl%intellij_info_aspect --override_repository=intellij_aspect=C:\Users\ADMIN.IdeaIC2017.3\config\plugins\ijwb\aspect --output_groups=intellij-compile-java,intellij-compile-py -- //...:all
信息:加载完成。分析...错误:读取扩展文件‘intellij_info_bundled.bzl’时遇到错误:没有这样的包'@intellij_aspect//':在C:/users/admin/appdata/local/temp/_bazel_sandhya/criyrv6d/external/intellij_aspect.中找不到工作区文件信息:找到3个目标...警告:无法为前缀‘bazel-’创建一个或多个方便的符号链接:无法创建符号链接bazel-out C:/users/admin/appdata/local/temp/_bazel_sandhya/criyrv6d/execroot/scala_example/bazel-out:无法创建交汇点(name=C:\users\admin\scalaprojects\example1\bazel-out,本地错误:src/main/ target=C:\users\admin\appdata\local\temp_bazel_sandhya\criyrv6d\execroot\scala_example\bazel-out):/windows/file-jni.cc(86):nativeCreateJunction(C:\users\admin\scalaprojects\example1\bazel-out,本地错误:src/main/ C:\users\admin\appdata\local\temp_bazel_sandhya\criyrv6d\execroot\scala_example\bazel-out):/windows/FILE.cc(128):当文件已经存在时,CreateJunction(\?\C:\users\admin\scalaprojects\example1\bazel-out):无法创建该文件。
无法创建符号链接bazel-out C:/users/admin/appdata/local/temp/_bazel_sandhya/criyrv6d/execroot/scala_example/bazel-out:无法创建交汇点本机错误:src/main/ (name=C:\users\admin\scalaprojects\example1\bazel-out,target=C:\users\admin\appdata\local\temp_bazel_sandhya\criyrv6d\execroot\scala_example\bazel-out):/windows/ -> -jni.cc(86):nativeCreateJunction(C:\users\admin\scalaprojects\example1\bazel-out,本地错误:src/main/ C:\users\admin\appdata\local\temp_bazel_sandhya\criyrv6d\execroot\scala_example\bazel-out):/windows/FILE.cc(128):当文件已经存在时,CreateJunction(\?\C:\users\admin\scalaprojects\example1\bazel-out):无法创建该文件。。信息:正在构建...错误:命令成功,但未分析所有目标。信息:流逝时间: 18.108s,关键路径: 0.05s Make失败
这只是一个示例Helloworld程序
发布于 2018-07-12 06:19:43
一般来说,像@Ittai一样,我建议您在intellij plugin github repo中打开一个问题。
不幸的是,您的插件版本不再受支持。我之前也遇到过一个老版本的插件的问题,有人建议我升级到最新版本。它解决了我所面临的具体问题。
报告问题时,请确保包含以下信息:
number
此外,为了验证这实际上是插件的问题,我还建议您尝试在基于Unix的系统上重现此问题。您似乎正在Windows上使用Intellij编译。这可能是无法识别方面的Windows特定问题。
尝试重新生成时,请确保将存储库克隆到单独的目录中,关闭intellij项目,然后重新打开该项目
https://stackoverflow.com/questions/51280291
复制相似问题