aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler/source
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2023-08-09 13:45:56 -0700
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2023-10-23 13:59:01 +0900
commitc5fd94073ff2e22b6eea29c242c7e4a12ed7c865 (patch)
tree327479235e44b16b1dd927b3d6b8b53b36bdc8c8 /lib/bundler/source
parent69d7e9a12eb6e3dbfa1b1021b73c2afcbf7d4a46 (diff)
downloadruby-c5fd94073ff2e22b6eea29c242c7e4a12ed7c865.tar.gz
[rubygems/rubygems] Refactor to checksums stored via source
This gets the specs passing, and handles the fact that we expect checkums to be pinned only to a particular source This also avoids reading in .gem files during lockfile generation, instead allowing us to query the source for each resolved gem to grab the checksum Finally, this opens up a route to having user-stored checksum databases, similar to how other package managers do this! Add checksums to dev lockfiles Handle full name conflicts from different original_platforms when adding checksums to store from compact index Specs passing on Bundler 3 https://github.com/rubygems/rubygems/commit/86c7084e1c
Diffstat (limited to 'lib/bundler/source')
-rw-r--r--lib/bundler/source/path.rb1
-rw-r--r--lib/bundler/source/rubygems.rb3
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/bundler/source/path.rb b/lib/bundler/source/path.rb
index bdfcf8274a..cdf871250a 100644
--- a/lib/bundler/source/path.rb
+++ b/lib/bundler/source/path.rb
@@ -14,6 +14,7 @@ module Bundler
DEFAULT_GLOB = "{,*,*/*}.gemspec"
def initialize(options)
+ @checksum_store = Checksum::Store.new
@options = options.dup
@glob = options["glob"] || DEFAULT_GLOB
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb
index 3d4d2eeec1..9ea8367006 100644
--- a/lib/bundler/source/rubygems.rb
+++ b/lib/bundler/source/rubygems.rb
@@ -19,6 +19,7 @@ module Bundler
@allow_remote = false
@allow_cached = false
@allow_local = options["allow_local"] || false
+ @checksum_store = Checksum::Store.new
Array(options["remotes"]).reverse_each {|r| add_remote(r) }
end
@@ -177,7 +178,7 @@ module Bundler
:wrappers => true,
:env_shebang => true,
:build_args => options[:build_args],
- :bundler_expected_checksum => spec.respond_to?(:checksum) && spec.checksum,
+ :bundler_checksum_store => spec.source.checksum_store,
:bundler_extension_cache_path => extension_cache_path(spec)
)