-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrepro.sh
executable file
·36 lines (26 loc) · 1.21 KB
/
repro.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#! /usr/bin/env bash
# Clear Bazel cache to demonstrate missing outfiles if needed
# sudo rm -rf ~/.cache/bazel
export GEM_HOME="${HOME}/rules_ruby_bug/.gem"
export BUNDLE_PATH="${GEM_HOME}"
rm -rf "${BUNDLE_PATH}"
# Generate Gemfile.lock if needed:
# bazel run --enable_workspace @ruby//:bundle -- update
# Run rb_bundle_install target
bazel build --enable_workspace //:repro
# Missing snakeyaml-1.31.jar in bazel outfiles
find "$(bazel info output_path)/k8-fastbuild/bin/external" -type f -name snakeyaml-1.31.jar
# bundle install with binary provided by bazel rule shows additional logs:
# "
# using maven for the first time results in maven
# downloading all its default plugin and can take time.
# as those plugins get cached on disk and further execution
# of maven is much faster then the first time.
# org.yaml:snakeyaml:1.31:compile
# "
# Showing that additional gem building steps were executed:
# https://github.com/ruby/psych/blob/master/psych.gemspec#L71
bazel run --enable_workspace @ruby//:bundle -- install --path "${BUNDLE_PATH}"
# Returns:
# ./rules_ruby_bug/.gem/jruby/3.1.0/gems/psych-3.3.3-java/lib/org/yaml/snakeyaml/1.31/snakeyaml-1.31.jar
find "${BUNDLE_PATH}" -type f -name snakeyaml-1.31.jar