File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,7 +7,21 @@ root="$(cd "$(dirname "$0")/.." && pwd)"
77
88env BUNDLE_GEMFILE=" $root /Gemfile" bundle install
99for gemfile in $root /packages/npm-packages/* /Gemfile; do
10+ # FIXME: This is a workaround for the following issue:
11+ # 1. `bundle install` does not support auto-self-upgrade for pre-release bundler versions suffixed with ".dev"
12+ # 2. ruby-head-wasm-wasi's component build depends on 2.6.0.dev, which added --target-rbconfig support
13+ # 3. If the "bundle" command here is earlier than 2.6.0.dev, "bundle install" does *not* self-upgrade to
14+ # the specified pre-release version, and it overwrites the Gemfile.lock with the earlier command version.
15+ # 4. Overwritten Gemfile.lock with the earlier bundler version causes auto-self-downgrade when running
16+ # "bundle install --target-rbconfig" inside "rbwasm build" command, then it fails because the earlier
17+ # bundler version does not support --target-rbconfig.
18+ #
19+ # Thus, we temporarily discard the Gemfile.lock changes here to prevent the auto-self-downgrade issue.
20+ # This workaround should be removed once we drop static Ruby builds from ruby-head-wasm-wasi or
21+ # a stable bundler version is released with --target-rbconfig support.
22+ cp " $gemfile .lock" " $gemfile .lock.orig"
1023 env BUNDLE_GEMFILE=" $gemfile " bundle install
24+ mv " $gemfile .lock.orig" " $gemfile .lock"
1125done
1226
1327# Build vendored jco if Rust toolchain is available and submodule is checked out
You can’t perform that action at this time.
0 commit comments