Open3

Bazel 系雑メモ

MATSUBARA NobutadaMATSUBARA Nobutada

rules_ruby を Mac でテスト実行する

Docker でやるのが簡単だった

リポジトリを手元に持ってきて

$ docker run -it --rm -v `pwd`:/work -w /work --entrypoint /bin/bash ruby:3.0-buster
root@xxxx:/work# curl -L -o /usr/bin/bazel https://github.com/bazelbuild/bazelisk/releases/download/v1.0/bazelisk-linux-amd64
root@xxxx:/work# chmod +x /usr/bin/bazel
root@xxxx:/work# bazel test //...

なお bin/setup は動かない

MATSUBARA NobutadaMATSUBARA Nobutada

Bazel + Steep、エラーメッセージをちゃんと表示できない

# Type checking files:

..............................................F..................F#<Errno::ENOENT: No such file or directory @ rb_sysopen - lib/length.rb>
  /execroot/rules_steep/bazel-out/darwin-fastbuild/bin/example/typecheck.runfiles/bundle_example/lib/ruby/3.1.0/bundler/gems/steep-8aa0c819879a/lib/steep/drivers/check.rb:219:in `read'
  /execroot/rules_steep/bazel-out/darwin-fastbuild/bin/example/typecheck.runfiles/bundle_example/lib/ruby/3.1.0/bundler/gems/steep-8aa0c819879a/lib/steep/drivers/check.rb:219:in `read'
  /execroot/rules_steep/bazel-out/darwin-fastbuild/bin/example/typecheck.runfiles/bundle_example/lib/ruby/3.1.0/bundler/gems/steep-8aa0c819879a/lib/steep/drivers/check.rb:219:in `block in print_result'
  /execroot/rules_steep/bazel-out/darwin-fastbuild/bin/example/typecheck.runfiles/bundle_example/lib/ruby/3.1.0/bundler/gems/steep-8aa0c819879a/lib/steep/drivers/check.rb:217:in `each'
  /execroot/rules_steep/bazel-out/darwin-fastbuild/bin/example/typecheck.runfiles/bundle_example/lib/ruby/3.1.0/bundler/gems/steep-8aa0c819879a/lib/steep/drivers/check.rb:217:in `print_result'
  /execroot/rules_steep/bazel-out/darwin-fastbuild/bin/example/typecheck.runfiles/bundle_example/lib/ruby/3.1.0/bundler/gems/steep-8aa0c819879a/lib/steep/drivers/check.rb:126:in `run'
  /execroot/rules_steep/bazel-out/darwin-fastbuild/bin/example/typecheck.runfiles/bundle_example/lib/ruby/3.1.0/bundler/gems/steep-8aa0c819879a/lib/steep/cli.rb:115:in `process_check'
  /execroot/rules_steep/bazel-out/darwin-fastbuild/bin/example/typecheck.runfiles/bundle_example/lib/ruby/3.1.0/bundler/gems/steep-8aa0c819879a/lib/steep/cli.rb:52:in `run'
  /external/bundle_example/lib/ruby/3.1.0/bundler/gems/steep-8aa0c819879a/exe/steep:11:in `<top (required)>'
  /execroot/rules_steep/bazel-out/darwin-fastbuild/bin/example/typecheck.runfiles/bundle_example/bin/steep:14:in `load'