| Age | Commit message (Collapse) | Author |
|
Running `bundle update --bundler` on a rails app locally:
```
==> memprof.after.txt <==
Total allocated: 301.90 kB (3794 objects)
Total retained: 73.24 kB (698 objects)
==> memprof.before.txt <==
Total allocated: 14.47 MB (196378 objects)
Total retained: 25.93 kB (202 objects)
```
So for a slight increase in retained memory (all keys are now retained),
we go from about 200k allocations in the settings file to under 4k
https://github.com/rubygems/rubygems/commit/e64debb6ae
|
|
Increase test coverage and be explicit about what is and is not supported.
https://github.com/rubygems/rubygems/commit/a096397a00
|
|
Ensure unrecognized SPECS types are ignored
https://github.com/rubygems/rubygems/commit/5b33e91075
|
|
When @allow_cached is true, @allow_local is always true,
therefore, the #installed_specs will always be merged after #cached_specs
is called. This makes starting with installed_specs.dup redundant.
When #cached_specs is called because @allow_remote is true and
@allow_cached is false, then installed_specs will be added after
cached_specs based on @allow_local.
We never need to add installed_specs here, so don't.
https://github.com/rubygems/rubygems/commit/49b38f9750
|
|
Rename Index#use(override = true) to #merge!
Rename Index @all_specs to @duplicates, it is not actually all specs.
@duplicates only holds specs that would have been overridden during a call to
Index#use or Index#merge!
Reduced dupes in @duplicates by not double adding the new spec to the
index and the @duplicates during #merge!
Reduce Array creation by using specialized methods when the one result
or no results are needed from the search.
https://github.com/rubygems/rubygems/commit/47e91125db
|
|
override = false
https://github.com/rubygems/rubygems/commit/790202691d
|
|
https://github.com/rubygems/rubygems/commit/75ffa8ef76
Co-authored-by: Martin Emde <martinemde@users.noreply.github.com>
|
|
memory usage
I previously identified and improved this method over in https://github.com/rubygems/rubygems/pull/6884
but while reviewing another memory_profiler profile, I realized another
gain we can eek out.
This method keeps comes up in part because `configs` is allocating a new
Hash every time. My last change took advantage of that by using `map!`
on it. `configs` is called quite often, including in this `[]` method,
so there's a benefit to memoizing it.
Back in `[]`, logically we are trying to find the first Hash in `configs`
that has a value for the given key. Currently, we end up `map` and
`compact` to just get that value.
Instead, we can use a loop over `configs`, and break when we find the
value for the key.
https://github.com/rubygems/rubygems/commit/b913cfc87b
|
|
It now does the redownloading/installing just like bundle install --redownload
https://github.com/rubygems/rubygems/commit/3b058e5eca
|
|
https://github.com/rubygems/rubygems/commit/f240bfad2a
|
|
https://github.com/rubygems/rubygems/commit/c969a192bf
|
|
https://github.com/rubygems/rubygems/commit/d275cdccb1
|
|
https://github.com/rubygems/rubygems/commit/d66815633b
|
|
remote gemfiles
If a legacy multi remote Gemfile depends transitively on a default gem,
then in standalone mode we'd fail to fetch the proper version from the
source that includes it, since we were adding it to `specs` (instead of
`remote_specs`), which was already including the default version of the
gem, and thus preventing the remote version from "overwriting that" and
being added to the index. We should add it to the `remote_specs` index
directly instead.
https://github.com/rubygems/rubygems/commit/05f4f9dfc0
|
|
https://github.com/rubygems/rubygems/commit/f664d60114
|
|
On legacy Gemfiles with multiple remote sources, where all of them
support the compact index API, we were still falling back to full
indexes.
Fixing this also allows to simplifying the code.
https://github.com/rubygems/rubygems/commit/b1357c8e72
|
|
from Gem::BUNDLED_GEMS::SINCE
[Feature #19846]
|
|
(https://github.com/rubygems/rubygems/pull/6898)
Supports .tool-versions (ASDF) by checking for a line starting with "ruby"
before falling back to reading the entire file, as in .ruby-version.
https://github.com/rubygems/rubygems/commit/6c0a3e793a
|
|
https://github.com/rubygems/rubygems/commit/75c0f27b7e
|
|
https://github.com/rubygems/rubygems/commit/46745885e8
|
|
still include that
https://github.com/rubygems/rubygems/commit/235d9b38d8
|
|
https://github.com/rubygems/rubygems/commit/e79ccdafd8
|
|
.prepend to avoid allocating a new string.
https://github.com/rubygems/rubygems/commit/2ac35a661f
|
|
when it's a symbol
https://github.com/rubygems/rubygems/commit/535feb817c
|
|
allocating a matchdata, which is not used
https://github.com/rubygems/rubygems/commit/cbf9ac93d7
|
|
it's a symbol.
https://github.com/rubygems/rubygems/commit/f8167db8a2
|
|
allocating it multiple times
https://github.com/rubygems/rubygems/commit/8eac49c429
|
|
boundaries
https://github.com/rubygems/rubygems/commit/d7cde68034
|
|
individual keys are also new, so we can use ! methods on each individual one as well.
https://github.com/rubygems/rubygems/commit/f2e912b9bb
|
|
multiple times. This saves allocating 2 arrays
https://github.com/rubygems/rubygems/commit/48c03b33b7
|
|
that means we can use bang methods to avoid allocating new copies
https://github.com/rubygems/rubygems/commit/8bc13fa55f
|
|
avoid allocating another hash.
`String#start_with?` is faster than regex that is bound to the start of
a string.
https://github.com/rubygems/rubygems/commit/9b2006ef09
|
|
This is a follow up to https://github.com/rubygems/rubygems/issues/6742.
This change makes it so that the version file is resolved relative to
the Bundle root instead of the working directory.
Why is this useful?
If you run a commnad (eg `rails`) from the `app/` directory, your bundle
would fail to load.
https://github.com/rubygems/rubygems/commit/6d47ee98b9
|
|
https://github.com/rubygems/rubygems/commit/fb9354b7bf
|
|
https://github.com/rubygems/rubygems/commit/09ef74ef73
|
|
private server
Before:
```
Fetching gem metadata from https://rubygems.org/........
Fetching source index from https://rubygems.pkg.github.com/my-org/
Bad username or password for https://x-access-token@rubygems.pkg.github.com/my-org/.
Please double-check your credentials and correct them.
```
After:
```
Fetching gem metadata from https://rubygems.org/........
Fetching source index from https://rubygems.pkg.github.com/my-org/
Access token could not be authenticated for https://x-access-token@rubygems.pkg.github.com/my-org/.
Make sure it's valid and has the necessary scopes configured.
```
https://github.com/rubygems/rubygems/commit/2ae69c964a
|
|
https://github.com/rubygems/rubygems/commit/ba3ea27869
|
|
https://github.com/rubygems/rubygems/commit/9a0e0dfd5b
|
|
https://github.com/rubygems/rubygems/commit/689c39b42f
|
|
This should be only for path sources, and unrelated to git.
https://github.com/rubygems/rubygems/commit/0d8f31eeed
|
|
https://github.com/rubygems/rubygems/commit/cfc82b592a
|
|
https://github.com/rubygems/rubygems/commit/784e08348e
|
|
https://github.com/rubygems/rubygems/commit/efebc64250
|
|
We only need to check whether the spec if for a direct dependency once.
https://github.com/rubygems/rubygems/commit/65b455a5cb
|
|
https://github.com/rubygems/rubygems/commit/2ab63bb94d
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/8172
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/8172
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/8172
|
|
https://github.com/rubygems/rubygems/commit/6ed69223d4
|
|
https://github.com/rubygems/rubygems/commit/9be984f281
|