summaryrefslogtreecommitdiff
path: root/include/ruby
diff options
context:
space:
mode:
authorEdouard CHIN <chin.edouard@gmail.com>2025-10-09 17:23:43 +0200
committergit <svn-admin@ruby-lang.org>2025-10-15 09:54:50 +0000
commitdce202d6d653dfc1b2c64822fe53066c3c558a78 (patch)
treea782b115ae3d04662aa35fa0a77c96d5573deaac /include/ruby
parent51b2c5a4cd8d1a26f25767366e95391b9de203b5 (diff)
[rubygems/rubygems] Add checksum of gems hosted on private servers:
- ### Problem Running `bundle lock --add-checksums` doesn't add the checksum of gems hosted on server that don't implement the compact index API. This result in a lockfile which is unusable in production as some checksums will be missing and Bundler raising an error. Users can work around this problem by running: `BUNDLE_LOCKFILE_CHECKSUMS=true bundle install --force` But this means redownloading and installing all gems which isn't great and slow on large apps. ### Context Bundler uses the Compact Index API to get the checksum of gems, but most private gem servers don't implement the compact index API (such as cloudsmith or packagecloud). This results in a soft failure on bundler side, and bundler leaving out blank checksum for those gems. ### Solution For gems that are hosted on private servers that don't send back the checksum of the gem, I'd like to fallback to the `bundle install` mechanism, which don't rely on an external API but instead compute the checksum of the package installed on disk. This patch goes through the spec that didn't return a checksum, and compute one if the package exists on disk. This solution makes the `bundle lock --add-checksums` command actually usable in real world scenarios while keeping the `bundle lock` command fast enough. https://github.com/rubygems/rubygems/commit/8e9abb5472
Diffstat (limited to 'include/ruby')
0 files changed, 0 insertions, 0 deletions