Skip to content

Upgrade to Bazel 8#30

Merged
jadenPete merged 4 commits intomasterfrom
upgrade-to-bazel-8
Feb 28, 2025
Merged

Upgrade to Bazel 8#30
jadenPete merged 4 commits intomasterfrom
upgrade-to-bazel-8

Conversation

@jadenPete
Copy link
Contributor

No description provided.

@jadenPete jadenPete requested a review from jjudd January 23, 2025 16:04
MODULE.bazel Outdated
bazel_dep(name = "buildifier_prebuilt", version = "8.0.1", dev_dependency = True)

rules_scala_annex_version = "lucid_2024-12-06"
rules_scala_annex_version = "upgrade-to-bazel-8"
Copy link
Contributor Author

@jadenPete jadenPete Jan 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Wait until upgrade-to-bazel-8 is merged and change this to a release tag.

@jadenPete
Copy link
Contributor Author

jadenPete commented Jan 23, 2025

  • Wait until migrate-to-bzlmod is merged.

@jadenPete
Copy link
Contributor Author

Rebased off of migrate-to-bzlmod.

"2.conf",
"3.conf",
],
deps = glob(["config/2.conf"]) + glob(["config/3.conf"]),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we removing config/2.conf from here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC the purpose of using globs here was to show how to use an optional dependency, where the file may or may not exist. This is something that we use in our codebase in order to allow developers to override configuration with a file that isn't checked into git.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was receiving errors that they didn't exist, but re-add this line and add allow_empty = True arguments.

@tmccombs
Copy link
Contributor

The build is failing:

ERROR: /home/runner/.cache/bazel/_bazel_runner/810d6126909a697c02d0c7230fed4929/external/rules_jvm_external++maven+annex/BUILD:4319:8: Executing genrule @@rules_jvm_external++maven+annex//:org_scala_lang_scala_reflect_2_13_15_extension failed: (Exit 1): bash failed: error executing Genrule command (from target @@rules_jvm_external++maven+annex//:org_scala_lang_scala_reflect_2_13_15_extension) 
  (cd /home/runner/.cache/bazel/_bazel_runner/810d6126909a697c02d0c7230fed4929/sandbox/linux-sandbox/2/execroot/_main && \
  exec env - \
    PATH=/bin:/usr/bin:/usr/local/bin \
  /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; cp external/rules_jvm_external++maven+org_scala_lang_scala_reflect_2_13_15/file/v1/org/scala-lang/scala-reflect/2.13.15/scala-reflect-2.13.15.jar bazel-out/k8-fastbuild/bin/external/rules_jvm_external++maven+annex/org/scala-lang/scala-reflect/2.13.15/scala-reflect-2.13.15.jar')
# Configuration: d336d1c852743625f01c41e329ea436930007b1c0ad80e7736d9034bd6c78a33
# Execution platform: @@platforms//host:host

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
src/main/tools/linux-sandbox-pid1.cc:516: "execvp(/bin/bash, 0x1891b7f0)": No such file or directory
ERROR: /home/runner/.cache/bazel/_bazel_runner/810d6126909a697c02d0c7230fed4929/external/rules_jvm_external++maven+annex/BUILD:3825:8: Executing genrule @@rules_jvm_external++maven+annex//:org_jline_jline_3_26_3_extension failed: (Exit 1): bash failed: error executing Genrule command (from target @@rules_jvm_external++maven+annex//:org_jline_jline_3_26_3_extension) 
  (cd /home/runner/.cache/bazel/_bazel_runner/810d6126909a697c02d0c7230fed4929/sandbox/linux-sandbox/1/execroot/_main && \
  exec env - \
    PATH=/bin:/usr/bin:/usr/local/bin \
  /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; cp external/rules_jvm_external++maven+org_jline_jline_3_26_3/file/v1/org/jline/jline/3.26.3/jline-3.26.3.jar bazel-out/k8-fastbuild/bin/external/rules_jvm_external++maven+annex/org/jline/jline/3.26.3/jline-3.26.3.jar')
# Configuration: d336d1c852743625f01c41e329ea436930007b1c0ad80e7736d9034bd6c78a33
# Execution platform: @@platforms//host:host

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
src/main/tools/linux-sandbox-pid1.cc:516: "execvp(/bin/bash, 0x33f297f0)": No such file or directory
Target @@rules_scala_annex+//rules/scalafmt:scalafmt failed to build

Copy link
Contributor

@tmccombs tmccombs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

failing build

.bazelversion Outdated
@@ -1 +1 @@
7.4.1
8.0.1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8.1.0 is out now, so let's use that instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! Now, we're using our custom version of Bazel, which is based on v8.1.1.

@jadenPete
Copy link
Contributor Author

Rebased off of master.

@jadenPete jadenPete changed the base branch from migrate-to-bzlmod to master February 28, 2025 00:38
@jadenPete
Copy link
Contributor Author

Squashed.

@jadenPete
Copy link
Contributor Author

jadenPete commented Feb 28, 2025

The build is failing:

ERROR: /home/runner/.cache/bazel/_bazel_runner/810d6126909a697c02d0c7230fed4929/external/rules_jvm_external++maven+annex/BUILD:4319:8: Executing genrule @@rules_jvm_external++maven+annex//:org_scala_lang_scala_reflect_2_13_15_extension failed: (Exit 1): bash failed: error executing Genrule command (from target @@rules_jvm_external++maven+annex//:org_scala_lang_scala_reflect_2_13_15_extension) 
  (cd /home/runner/.cache/bazel/_bazel_runner/810d6126909a697c02d0c7230fed4929/sandbox/linux-sandbox/2/execroot/_main && \
  exec env - \
    PATH=/bin:/usr/bin:/usr/local/bin \
  /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; cp external/rules_jvm_external++maven+org_scala_lang_scala_reflect_2_13_15/file/v1/org/scala-lang/scala-reflect/2.13.15/scala-reflect-2.13.15.jar bazel-out/k8-fastbuild/bin/external/rules_jvm_external++maven+annex/org/scala-lang/scala-reflect/2.13.15/scala-reflect-2.13.15.jar')
# Configuration: d336d1c852743625f01c41e329ea436930007b1c0ad80e7736d9034bd6c78a33
# Execution platform: @@platforms//host:host

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
src/main/tools/linux-sandbox-pid1.cc:516: "execvp(/bin/bash, 0x1891b7f0)": No such file or directory
ERROR: /home/runner/.cache/bazel/_bazel_runner/810d6126909a697c02d0c7230fed4929/external/rules_jvm_external++maven+annex/BUILD:3825:8: Executing genrule @@rules_jvm_external++maven+annex//:org_jline_jline_3_26_3_extension failed: (Exit 1): bash failed: error executing Genrule command (from target @@rules_jvm_external++maven+annex//:org_jline_jline_3_26_3_extension) 
  (cd /home/runner/.cache/bazel/_bazel_runner/810d6126909a697c02d0c7230fed4929/sandbox/linux-sandbox/1/execroot/_main && \
  exec env - \
    PATH=/bin:/usr/bin:/usr/local/bin \
  /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; cp external/rules_jvm_external++maven+org_jline_jline_3_26_3/file/v1/org/jline/jline/3.26.3/jline-3.26.3.jar bazel-out/k8-fastbuild/bin/external/rules_jvm_external++maven+annex/org/jline/jline/3.26.3/jline-3.26.3.jar')
# Configuration: d336d1c852743625f01c41e329ea436930007b1c0ad80e7736d9034bd6c78a33
# Execution platform: @@platforms//host:host

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
src/main/tools/linux-sandbox-pid1.cc:516: "execvp(/bin/bash, 0x33f297f0)": No such file or directory
Target @@rules_scala_annex+//rules/scalafmt:scalafmt failed to build

I think this should be fixed with my latest changes, but we'll see. I know this is a bug with the sandbox, but I'm unsure what exactly causes it. @jjudd likely knows more than me on this one.

@jadenPete
Copy link
Contributor Author

Squashed.

@jadenPete jadenPete merged commit 72ff185 into master Feb 28, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants