Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rules_kotlin is failing with Bazel@HEAD in downstream CI. #985

Closed
sgowroji opened this issue Jun 8, 2023 · 4 comments · Fixed by #986
Closed

rules_kotlin is failing with Bazel@HEAD in downstream CI. #985

sgowroji opened this issue Jun 8, 2023 · 4 comments · Fixed by #986
Assignees
Labels

Comments

@sgowroji
Copy link
Member

sgowroji commented Jun 8, 2023

https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/3082#0188992d-b774-453d-893e-0556c0e0db8f

Platform : Ubuntu LTS 18.04

Logs :

ERROR: /var/lib/buildkite-agent/builds/bk-docker-762r/bazel-downstream-projects/rules_kotlin/kotlin/BUILD:37:12: Generating proto for Starlark doc for jvm failed: (Exit 1): stardoc failed: error executing Stardoc command (from target //kotlin:jvm)
SkydocMain$StarlarkEvaluationException: File external/bazel_tools/tools/jdk/toolchain_utils.bzl imported '@rules_java//toolchains:toolchain_utils.bzl', yet external/rules_java/toolchains/toolchain_utils.bzl was not found, even at roots [., external/dev_io_bazel_rules_kotlin].
	at com.google.devtools.build.skydoc.SkydocMain.recursiveEval(SkydocMain.java:434)
	at com.google.devtools.build.skydoc.SkydocMain.recursiveEval(SkydocMain.java:424)
	at com.google.devtools.build.skydoc.SkydocMain.recursiveEval(SkydocMain.java:424)
	at com.google.devtools.build.skydoc.SkydocMain.recursiveEval(SkydocMain.java:424)
	at com.google.devtools.build.skydoc.SkydocMain.recursiveEval(SkydocMain.java:424)
	at com.google.devtools.build.skydoc.SkydocMain.eval(SkydocMain.java:259)
	at com.google.devtools.build.skydoc.SkydocMain.main(SkydocMain.java:162)
Caused by: java.nio.file.NoSuchFileException: external/rules_java/toolchains/toolchain_utils.bzl
	at com.google.devtools.build.skydoc.SkydocMain.getInputSource(SkydocMain.java:484)
	at com.google.devtools.build.skydoc.SkydocMain.recursiveEval(SkydocMain.java:407)
	at com.google.devtools.build.skydoc.SkydocMain.recursiveEval(SkydocMain.java:424)
	... 6 more
Stardoc documentation generation failed: File external/bazel_tools/tools/jdk/toolchain_utils.bzl imported '@rules_java//toolchains:toolchain_utils.bzl', yet external/rules_java/toolchains/toolchain_utils.bzl was not found, even at roots [., external/dev_io_bazel_rules_kotlin].

Steps :

git clone -v https://github.com/bazelbuild/rules_kotlin.git
git reset f34b26ac105027eb4788281aaec98dc8e8735d55 --hard
export USE_BAZEL_VERSION=eab65f9f1ad489f18cdd8c3c9d66c77226152060
bazel build //kotlin:stardoc

CC'ing Green team : @mai93

@restingbull restingbull self-assigned this Jun 9, 2023
@restingbull
Copy link
Collaborator

Need to update stardoc

@restingbull
Copy link
Collaborator

ERROR: /private/var/tmp/_bazel_restingbull/19ac293cf5996177b7db27f85a8170cb/external/io_bazel_stardoc/stardoc/BUILD:74:12: in java_import rule @io_bazel_stardoc//stardoc:prebuilt_renderer_binary: target '@io_bazel_stardoc//:license' is not visible from target '@io_bazel_stardoc//stardoc:prebuilt_renderer_binary'. Check the visibility declaration of the former target if you think the dependency is legitimate
ERROR: /private/var/tmp/_bazel_restingbull/19ac293cf5996177b7db27f85a8170cb/external/io_bazel_stardoc/stardoc/BUILD:74:12: Analysis of target '@io_bazel_stardoc//stardoc:prebuilt_renderer_binary' failed
ERROR: Analysis of target '//kotlin:stardoc' failed; build aborted

@restingbull
Copy link
Collaborator

Only breaks with export USE_BAZEL_VERSION=eab65f9f1ad489f18cdd8c3c9d66c77226152060

Assuming that 7 is doing funky things with the SBOM.

verified with new stardoc:

 $ bazel build //kotlin:stardoc --check_visibility=false 
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=1 --terminal_columns=181
INFO: Reading rc options for 'build' from /Users/restingbull/Development/rules_kotlin/.bazelrc:
  'build' options: --strategy=KotlinCompile=worker --test_output=all --verbose_failures
INFO: Reading rc options for 'build' from /Users/restingbull/.bazelrc:
  'build' options: --announce_rc
INFO: Build option --check_visibility has changed, discarding analysis cache.
WARNING: /private/var/tmp/_bazel_restingbull/19ac293cf5996177b7db27f85a8170cb/external/io_bazel_stardoc/stardoc/BUILD:60:12: in java_import rule @io_bazel_stardoc//stardoc:prebuilt_stardoc_binary: Target '@io_bazel_stardoc//stardoc:prebuilt_stardoc_binary' violates visibility of target '@io_bazel_stardoc//:license'. Continuing because --nocheck_visibility is active
WARNING: /private/var/tmp/_bazel_restingbull/19ac293cf5996177b7db27f85a8170cb/external/io_bazel_stardoc/stardoc/BUILD:74:12: in java_import rule @io_bazel_stardoc//stardoc:prebuilt_renderer_binary: Target '@io_bazel_stardoc//stardoc:prebuilt_renderer_binary' violates visibility of target '@io_bazel_stardoc//:license'. Continuing because --nocheck_visibility is active
WARNING: /private/var/tmp/_bazel_restingbull/19ac293cf5996177b7db27f85a8170cb/external/io_bazel_stardoc/stardoc/BUILD:66:12: in java_binary rule @io_bazel_stardoc//stardoc:renderer: Target '@io_bazel_stardoc//stardoc:renderer' violates visibility of target '@io_bazel_stardoc//:license'. Continuing because --nocheck_visibility is active
INFO: Analyzed target //kotlin:stardoc (0 packages loaded, 620 targets configured).
INFO: Found 1 target...
Target //kotlin:stardoc up-to-date:
  bazel-bin/kotlin/kotlin.md
INFO: Elapsed time: 5.463s, Critical Path: 4.51s
INFO: 38 processes: 19 internal, 13 darwin-sandbox, 6 worker.
INFO: Build completed successfully, 38 total actions

@restingbull
Copy link
Collaborator

filed: bazelbuild/stardoc#160

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants