Closed ydynnikov closed 9 months ago
This is for bzlmod, correct?
@restingbull hi, yes, it's for bzlmod. I've already dug deeper and found that it was due to the fact that when you use terminal in IDEA, it's powershell by default. When launching bazel from msys shell there is no problem
Worth noting that the problem could be visible earlier: repository_ctx.execute
returns status struct that could be checked for failures. In my case failure was something like "CreateProcessW(...): mv is not recognized as a program"
As for logging - it might be related to the fact that repository didn't fail to initialize, and between runs I only did bazel clean
, not bazel clean --expunge
(I'm new to bazel, so I might not understand simple things yet)
@restingbull hi, I've managed to get this working both in msys2 and in powershell
For powershell you need mv.exe
to be exposed to powershell, so putting msys's /usr/bin
to PATH worked
There is another problem with running tests, but it deserves its own ticket
Reproducible both on our repo with bazel 7.0.0 (using bzlmod) and when I do fresh checkout of this repository on tag v1.9.0
Platform: Windows 11
bazel build //...
fails with errors looking likeWhat I've found by log-debugging (I don't know how to debug starlark in any other way yet :-( ):
kotlin_compiler_repository
inintialize.release.bzl
, it prints_kotlin_compiler_impl
incompiler.bzl
, it prints_ksp_compiler_plugin_repository_impl
inksp.bzl
, it doesn't printIf you explicitly specify all the jars listed in
_JARS_INSIDE_REPO
(inksp.bzl
) in srcs of filegroup inBUILD.com_github_google_ksp.bazel
, it works and downloads all jars. After that you can replace it back withglob
and it will still work as jars are already there.I don't see any tests for bzlmod on windows among other builds in buildkite, is it even supported now?
https://buildkite.com/bazel/rules-kotlin-kotlin/builds/3877#018cb2e4-35d7-473e-8c59-08ff4f6e5405