| Age | Commit message (Collapse) | Author |
|
Bumps the rb-sys group with 1 update in the /test/rubygems/test_gem_ext_cargo_builder/custom_name/ext/custom_name_lib directory: [rb-sys](https://github.com/oxidize-rb/rb-sys).
Bumps the rb-sys group with 1 update in the /test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example directory: [rb-sys](https://github.com/oxidize-rb/rb-sys).
Updates `rb-sys` from 0.9.117 to 0.9.123
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.117...v0.9.123)
Updates `rb-sys` from 0.9.117 to 0.9.123
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.117...v0.9.123)
---
updated-dependencies:
- dependency-name: rb-sys
dependency-version: 0.9.123
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rb-sys
- dependency-name: rb-sys
dependency-version: 0.9.123
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rb-sys
...
Signed-off-by: dependabot[bot] <support@github.com>
https://github.com/ruby/rubygems/commit/551c665b6b
|
|
This change updates `write_binary` to use a new class,
`AtomicFileWriter.open` to write the gem's files. This implementation
is borrowed from Active Support's [`atomic_write`](https://github.com/rails/rails/blob/main/activesupport/lib/active_support/core_ext/file/atomic.rb).
Atomic write will write the files to a temporary file and then once
created, sets permissions and renames the file. If the file is corrupted
- ie on failed download, an error occurs, or for some other reason, the
real file will not be created. The changes made here make `verify_gz`
obsolete, we don't need to verify it if we have successfully created the
file atomically. If it exists, it is not corrupt. If it is corrupt, the
file won't exist on disk.
While writing tests for this functionality I replaced the
`RemoteFetcher` stub with `FakeFetcher` except for where we really do
need to overwrite the `RemoteFetcher`. The new test implementation is much
clearer on what it's trying to accomplish versus the prior test
implementation.
https://github.com/ruby/rubygems/commit/0cd4b54291
|
|
`Dir.mktmpdir` concatenates a random base-36 number separated by "-",
so may generate pathnames containing "-j2".
|
|
`Dir.mktmpdir` concatenates a random base-36 number separated by "-",
so may generate pathnames containing "-j4".
|
|
|
|
`Dir.mktmpdir` concatenates a random base-36 number separated by "-",
so may generate pathnames containing "-j4".
|
|
|
|
https://github.com/ruby/rubygems/commit/be5c4e27d9
|
|
https://github.com/ruby/rubygems/commit/09e6031a11
|
|
- Added a new `-j` option to `gem install` and `gem update`.
This option allows to specify the number of jobs we pass to `make`
when compiling gem with native extensions.
By default its the number of processors, but users may want a way
to control this.
You can use it like so: `gem install json -j8`
https://github.com/ruby/rubygems/commit/67aad88ca6
|
|
This change updates `write_binary` to use a new class,
`AtomicFileWriter.open` to write the gem's files. This implementation
is borrowed from Active Support's [`atomic_write`](https://github.com/rails/rails/blob/main/activesupport/lib/active_support/core_ext/file/atomic.rb).
Atomic write will write the files to a temporary file and then once
created, sets permissions and renames the file. If the file is corrupted
- ie on failed download, an error occurs, or for some other reason, the
real file will not be created. The changes made here make `verify_gz`
obsolete, we don't need to verify it if we have successfully created the
file atomically. If it exists, it is not corrupt. If it is corrupt, the
file won't exist on disk.
While writing tests for this functionality I replaced the
`RemoteFetcher` stub with `FakeFetcher` except for where we really do
need to overwrite the `RemoteFetcher`. The new test implementation is much
clearer on what it's trying to accomplish versus the prior test
implementation.
https://github.com/ruby/rubygems/commit/0cd4b54291
|
|
installation.
https://github.com/ruby/rubygems/commit/a70e573973
|
|
- ### TL;DR
Bundler is heavily limited by the connection pool which manages a
single connection. By increasing the number of connection, we can
drastiscally speed up the installation process when many gems need
to be downloaded and installed.
### Benchmark
There are various factors that are hard to control such as
compilation time and network speed but after dozens of tests I
can consistently get aroud 70% speed increase when downloading and
installing 472 gems, most having no native extensions (on purpose).
```
# Before
bundle install 28.60s user 12.70s system 179% cpu 23.014 total
# After
bundle install 30.09s user 15.90s system 281% cpu 16.317 total
```
You can find on this gist how this was benchmarked and the Gemfile
used https://gist.github.com/Edouard-chin/c8e39148c0cdf324dae827716fbe24a0
### Context
A while ago in #869, Aaron introduced a connection pool which
greatly improved Bundler speed. It was noted in the PR description
that managing one connection was already good enough and it wasn't
clear whether we needed more connections. Aaron also had the
intuition that we may need to increase the pool for downloading
gems and he was right.
> We need to study how RubyGems uses connections and make a decision
> based on request usage (e.g. only use one connection for many small
> requests like bundler API, and maybe many connections for
> downloading gems)
When bundler downloads and installs gem in parallel https://github.com/ruby/rubygems/blob/4f85e02fdd89ee28852722dfed42a13c9f5c9193/bundler/lib/bundler/installer/parallel_installer.rb#L128
most threads have to wait for the only connection in the pool to be
available which is not efficient.
### Solution
This commit modifies the pool size for the fetcher that Bundler
uses. RubyGems fetcher will continue to use a single connection.
The bundler fetcher is used in 2 places.
1. When downloading gems https://github.com/ruby/rubygems/blob/4f85e02fdd89ee28852722dfed42a13c9f5c9193/bundler/lib/bundler/source/rubygems.rb#L481-L484
2. When grabing the index (not the compact index) using the
`bundle install --full-index` flag.
https://github.com/ruby/rubygems/blob/4f85e02fdd89ee28852722dfed42a13c9f5c9193/bundler/lib/bundler/fetcher/index.rb#L9
Having more connections in 2) is not any useful but tweaking the
size based on where the fetcher is used is a bit tricky so I opted
to modify it at the class level.
I fiddle with the pool size and found that 5 seems to be the sweet
spot at least for my environment.
https://github.com/ruby/rubygems/commit/6063fd9963
|
|
This pattern is extremely common across the ecosystem, I don't think
it's reasonable to deprecate it.
I understand the performance argument, but perhaps the dependency
resolution algorithm can use another method that is private API
and only works with two `Version` instance.
https://github.com/ruby/rubygems/commit/024b4b547a
|
|
https://github.com/ruby/rubygems/commit/fbf6fb667e
|
|
|
|
If we use "system" variable in BUNDLE_VERSION on Bundler configuration,
we can use bundler version provided by system installation.
But the current logic returns the first activated version of bundler
like 2.7.2. It makes to confuse users.
https://github.com/ruby/rubygems/commit/4eb66d9549
|
|
Comparing version objects is a huge bottleneck in dependency solvers
(like inside Bundler). I would like to make comparing version objects
cheaper. Right now we support comparing version objects with strings by
trying to coerce the string to a version. So for example:
```ruby
Gem::Version.new("1") <=> "12"
```
I would like to deprecate and remove support for this feature so that we
can reduce the overhead of `def <=>`.
I'm not sure what version of RubyGems we could remove this from though.
https://github.com/ruby/rubygems/commit/81b7602183
|
|
This is useful, in case you're using Docker, and an upstream
Dockerfile sets BUNDLER_VERSION to something you don't want.
It's impossible to unset it... only override to be the empty
string.
https://github.com/ruby/rubygems/commit/ffa3eb9ac6
|
|
It seems like we were trying to deprecate passing `nil` to
Gem::Version.new. This breaks existing code, and I don't think there is
a good reason to deprecate this usage.
I believe what we want to prevent is the following code:
```ruby
Gem::Specification.new do |spec|
spec.version = nil
# suddenly the spec version is 0!
p spec.version
end
```
This commit allows people to manually construct `Gem::Version.new(nil)`,
but when someone assigns `nil` as the Gem specification version, it sets
the spec version to `nil` (making the specification invalid). People
who manually construct `Gem::Version` objects and use nil should be
allowed to do it, and `Gem::Version.new(nil) == Gem::Version.new("0")`,
but people who assign `nil` in a gemspec will get an invalid gemspec.
I think deprecation started
[here](https://github.com/ruby/rubygems/pull/2203) but there doesn't
seem to be a reason to do it.
Fixes https://github.com/ruby/rubygems/pull/9052
https://github.com/ruby/rubygems/commit/ded5e909c2
|
|
https://github.com/ruby/rubygems/commit/3471646d43
|
|
and has_rdoc?
https://github.com/ruby/rubygems/commit/b043538576
|
|
https://github.com/ruby/rubygems/commit/9b19e1f555
|
|
https://github.com/ruby/rubygems/commit/de269cfbb6
|
|
Gem::DependencyInstaller#find_gems_with_sources
https://github.com/ruby/rubygems/commit/1b3f3bf194
|
|
https://github.com/ruby/rubygems/commit/728269cc4a
|
|
https://github.com/ruby/rubygems/commit/f4b4f12f91
|
|
https://github.com/ruby/rubygems/commit/96cef34041
|
|
https://github.com/ruby/rubygems/commit/be3b09c786
|
|
While the latter creates an intermediate array of all method names
including all ancestors, the former just traverse the inheritance
chain and can stop if found once.
https://github.com/ruby/rubygems/commit/b291070b3b
|
|
https://github.com/ruby/rubygems/commit/93b8492bc0
|
|
|
|
https://github.com/ruby/rubygems/commit/0cf49e22af
|
|
https://github.com/ruby/rubygems/commit/b59917447c
|
|
`Ractor#value` replaces `Ractor#take`; if the former is defined the
latter is undefined, and vice versa.
|
|
https://github.com/ruby/rubygems/commit/d7bc3a6d82
|
|
https://github.com/ruby/rubygems/commit/da0a14801a
|
|
running under the ruby/rubygems repo
https://github.com/ruby/rubygems/commit/47f41ce2df
|
|
|
|
This reverts commit 136157e772ab2b2ea08555d0ad821da7dc2bde96.
|
|
I would like to start making some of the methods in Gem::Package
private so that we can refactor them better. Right now we have many
methods that are public, and since they are public we can't refactor
them. Historically, I think "private" methods have just been tagged
with :nodoc:, but I would like to be more strict about our APIs
https://github.com/ruby/rubygems/commit/fb352e9176
|
|
This reverts commit 2c2eaa3103e5cf1cbfc2b16d9db975a9b8a0399a.
|
|
I would like to use the tar implementation inside a Ractor, but two of
the constants are not frozen. This patch freezes the constants so we
can use it in a Ractor.
https://github.com/ruby/rubygems/commit/0ff4790f4c
|
|
building gems
In general, rubygems should provide mechanism and not policy.
Pessimistic versioning is not universally better, and in many
cases, it can cause more problems than it solves. Rubygems should
not be warning against open-ended versioning when building gems.
The majority of the default gems with dependencies do not use
pessimistic versioning, which indicates that Ruby itself
recognizes that open-ended versioning is generally better.
In some cases, depending on a prerelease gem is the only choice
other than not releasing a gem. If you are building an extension
gem for a feature in a prerelease version of another gem, then
depending on the prerelease version is the only way to ensure
a compatible dependency is installed.
https://github.com/ruby/rubygems/commit/beba8dd065
|
|
https://github.com/ruby/rubygems/commit/81dbd42abf
|
|
https://github.com/ruby/rubygems/commit/15e46a3a68
|
|
https://github.com/ruby/rubygems/commit/3946be008c
|
|
https://github.com/ruby/rubygems/commit/c637007e91
|
|
#8572. Specifically:
* Correctly pass command line arguments to CMake
* Call CMake twice - once to configure a project and a second time to build (which is the standard way to use CMake). This fixes the previously incorrect assumption that CMake generates a Make file.
* Update the tests to specify a CMake minimum version of 3.26 (which is already two years old). 3.26 is a bit arbritary but it aligns with Rice, and updates from the ancient 3.5 version being used (which CMake generates a warning message saying stop using it!)
* Update the CMake call to use CMAKE_RUNTIME_OUTPUT_DIRECTORY and CMAKE_LIBRARY_OUTPUT_DIRECTORY to tell CMake to copy compiled binaries to the a Gem's lib directory.
Note the updated builder took inspiration from the Cargo Builder, meaning you first create an instance of CmakeBuilder versus just calling class methods.
https://github.com/rubygems/rubygems/commit/9e248d4679
|
|
This reverts commit 8aa885c460aeb70878538eebdd155c6318989fd2 and
cd07c3cbae7e287350d713ead237aeef27cc2b9e.
|