On a different patch, it was noticed Ngam Pham that we are calling
`LazySpecification#hash` many times, and simply memoizing that led to a
very considerable performance improvement in his app.
I noticed though that we shouldn't be calling `LazySpecification#hash`
that many times, and I located the culprit at `SpecSet#for` where we
were deduplicating the partial aggregated result on every iteration. It
is enough to do it just once at the end.
This leads on a 12% speedup on Rails repository Gemfile vs the previous
8% I was getting from memoizing `LazySpecification#hash`. Also, after
this patch memoizing `LazySpecification#hash` has no effect in
performance anymore.
https://github.com/rubygems/rubygems/commit/68d00a9edd
Co-authored-by: Ngan Pham <ngan@users.noreply.github.com>
Note this change is only for `configure.ac`, not for Windows using
`win32/configure.bat`.
```
$ ./configure --help | grep mkmf
--enable-mkmf-verbose enable verbose in mkmf
```
Run the following command to enable the mkmf verbose mode.
```
$ ./configure --enable-mkmf-verbose
$ grep MKMF_VERBOSE config.status
S["MKMF_VERBOSE"]="1"
```
In this mkmf verbose mode, when compiling a native extension, the
`rake compile` prints the compiling commands such as
"gcc -I. <...> path/to/file" instead of "compiling path/to/file".
```
$ git clone https://github.com/deivid-rodriguez/byebug.git
$ cd byebug
$ bundle install --standalone
$ bundle exec rake compile
...
gcc -I. <...> path/to/file
...
```
URI::Generic#{user,password} return the encoded values, which are
not that useful if you want to do authentication with them.
Automatic decoding by default would break backwards compatibility.
Optional automatic decoding via a keyword to URI.parse would
require threading the option through at least 3 other methods, and
would make semantics confusing (user= takes encoded or unencoded
password?) or require more work. Thus, adding this as a separate
method seemed the simplest approach.
Unfortunately, URI lacks a method for correct decoding. Unlike in
www form components, + in earlier parts of the URI such as the
userinfo section is treated verbatim and not as an encoded space.
Add URI.#{en,de}code_uri_component methods, which are almost the
same as URI.#{en,de}code_www_form_component, but without the
special SP => + handling.
Implements [Feature #9045]
https://github.com/ruby/uri/commit/16cfc4e92f
The module here is called `URI`, so it's probably reasonable to expect a requirement for the path to be RFC3986-compliant, but on the other hand, the class is called `File`, so it might be reasonable to expect that a path produced by e.g. the `File` class would be consumable by its `build` method (this fails if the filename contains e.g. a space).
https://github.com/ruby/uri/commit/ef79789b83
A while ago, we fixed resolution when using old dependency endpoints to
also consider metadata dependencies, by requesting the full gemspec from
the marsahaled index, which includes this information as opposed to
these old APIs. This has made resolution slower, but correct, but also
introduced the issue that some old marshaled gemspecs don't include the
`required_rubygems_version` field because they were created with a
RubyGems version that predates its addition.
Use a default value in this case.
https://github.com/rubygems/rubygems/commit/5dc94afcc0
Co-authored-by: Ilya Dudarenko <i.dudarenko@tinkoff.ru>