| Age | Commit message (Collapse) | Author |
|
https://github.com/rubygems/rubygems/commit/f58660ffcc
|
|
This commit switches out the full gemspec validation for a partial one
which only performs resolution related checks. This will allow gem
authors to run `bundle` commands immediately after creating a new gem
with Bundler, rather than having to fix metadata validation issues in
the default gemspec.
https://github.com/rubygems/rubygems/commit/d5aa9cae9d
|
|
This method validates only what is required for resolution, skipping any
irrelevant metadata validation. This will be used by Bundler instead of
doing a full validation, allowing gem authors to use `bundle` commands
immediately in newly created gems without first having to fix invalid
metafata fields in the default gemspec.
https://github.com/rubygems/rubygems/commit/da7704cfc0
|
|
https://github.com/rubygems/rubygems/commit/72103ca1e8
|
|
(https://github.com/ruby/reline/pull/727)
https://github.com/ruby/reline/commit/be45660c83
|
|
(https://github.com/rubygems/rubygems/pull/6483)
https://github.com/rubygems/rubygems/commit/41d8cffd2e
Co-Authored-By: MSP-Greg <Greg.mpls@gmail.com>
|
|
RFC9562 was released almost two weeks ago, so we can replace the "draft"
UUIDv7 URL with the final RFC URL too. RFC9562 obsoletes RFC4122, so I
replaced its link as well.
https://github.com/ruby/securerandom/commit/1e41c3d2cb
|
|
a full unlock
https://github.com/rubygems/rubygems/commit/a8670e43f8
|
|
When locked only to RUBY, and some locked spec does not meet locked
dependencies, Bundler would remove the only locked platform and end up
creating a lockfile with empty sections.
We can't rely on our criteria to remove invalid platforms if locked
specs are not valid in the first place.
https://github.com/rubygems/rubygems/commit/1dba05cf53
|
|
cached! are used
https://github.com/rubygems/rubygems/commit/04b26731cb
|
|
Calling `remote!` or `cached!` on the source was expiring local specs
for now reason. It's unnecessary to override these methods for path
sources since they only deal with local specifications.
https://github.com/rubygems/rubygems/commit/aa93b196a2
|
|
local platform is locked
https://github.com/rubygems/rubygems/commit/36a02c6128
|
|
If RUBY is the only platform in the lockfile, we were skipping adding
the local platform to the list of resolution platforms. This generally
works anyways, because we had some code to still add it if the RUBY
platform is not valid for the set of locked gems.
However, sometimes it can happen that "RUBY" is valid for the current
set of locked gems, but when adding a new dependency, it becomes
invalid. For example, when adding sorbet to a Gemfile, that will
introduce `sorbet-static` as an indirect dependency which does not have
a generic "RUBY" variant. This will cause resolution to take a long time
continuously backtracking trying to find solutions that don't introduce
`sorbet-static` as a dependency and will eventually fail.
Instead, we can always add the local platform to the set of resolution
platforms before resolving, and remove it as necessary after resolution
so that we lock the correct set of platforms.
https://github.com/rubygems/rubygems/commit/6ed1fe6050
|
|
The `force-ruby-platform` settings is properly respected when
materializing since https://github.com/rubygems/rubygems/commit/e17d7e9efb91.
https://github.com/rubygems/rubygems/commit/c4ba54eb96
|
|
* The string search parser was more memory efficient but
in some cases, much slower. Reverting until a better
solution is found.
* Handle the situation where the line might be blank (Artifactory bug)
https://github.com/rubygems/rubygems/commit/222d38737d
|
|
https://github.com/rubygems/rubygems/commit/30dce3f87d
|
|
https://github.com/ruby/prism/commit/5985ab7687
|
|
`current_dependencies` doesn't return gems in optional groups, while `specs` would
Closes https://github.com/rubygems/rubygems/pull/7757
https://github.com/rubygems/rubygems/commit/c797e95636
|
|
This patch optimizes forwarding callers and callees. It only optimizes methods that only take `...` as their parameter, and then pass `...` to other calls.
Calls it optimizes look like this:
```ruby
def bar(a) = a
def foo(...) = bar(...) # optimized
foo(123)
```
```ruby
def bar(a) = a
def foo(...) = bar(1, 2, ...) # optimized
foo(123)
```
```ruby
def bar(*a) = a
def foo(...)
list = [1, 2]
bar(*list, ...) # optimized
end
foo(123)
```
All variants of the above but using `super` are also optimized, including a bare super like this:
```ruby
def foo(...)
super
end
```
This patch eliminates intermediate allocations made when calling methods that accept `...`.
We can observe allocation elimination like this:
```ruby
def m
x = GC.stat(:total_allocated_objects)
yield
GC.stat(:total_allocated_objects) - x
end
def bar(a) = a
def foo(...) = bar(...)
def test
m { foo(123) }
end
test
p test # allocates 1 object on master, but 0 objects with this patch
```
```ruby
def bar(a, b:) = a + b
def foo(...) = bar(...)
def test
m { foo(1, b: 2) }
end
test
p test # allocates 2 objects on master, but 0 objects with this patch
```
How does it work?
-----------------
This patch works by using a dynamic stack size when passing forwarded parameters to callees.
The caller's info object (known as the "CI") contains the stack size of the
parameters, so we pass the CI object itself as a parameter to the callee.
When forwarding parameters, the forwarding ISeq uses the caller's CI to determine how much stack to copy, then copies the caller's stack before calling the callee.
The CI at the forwarded call site is adjusted using information from the caller's CI.
I think this description is kind of confusing, so let's walk through an example with code.
```ruby
def delegatee(a, b) = a + b
def delegator(...)
delegatee(...) # CI2 (FORWARDING)
end
def caller
delegator(1, 2) # CI1 (argc: 2)
end
```
Before we call the delegator method, the stack looks like this:
```
Executing Line | Code | Stack
---------------+---------------------------------------+--------
1| def delegatee(a, b) = a + b | self
2| | 1
3| def delegator(...) | 2
4| # |
5| delegatee(...) # CI2 (FORWARDING) |
6| end |
7| |
8| def caller |
-> 9| delegator(1, 2) # CI1 (argc: 2) |
10| end |
```
The ISeq for `delegator` is tagged as "forwardable", so when `caller` calls in
to `delegator`, it writes `CI1` on to the stack as a local variable for the
`delegator` method. The `delegator` method has a special local called `...`
that holds the caller's CI object.
Here is the ISeq disasm fo `delegator`:
```
== disasm: #<ISeq:delegator@-e:1 (1,0)-(1,39)>
local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1])
[ 1] "..."@0
0000 putself ( 1)[LiCa]
0001 getlocal_WC_0 "..."@0
0003 send <calldata!mid:delegatee, argc:0, FCALL|FORWARDING>, nil
0006 leave [Re]
```
The local called `...` will contain the caller's CI: CI1.
Here is the stack when we enter `delegator`:
```
Executing Line | Code | Stack
---------------+---------------------------------------+--------
1| def delegatee(a, b) = a + b | self
2| | 1
3| def delegator(...) | 2
-> 4| # | CI1 (argc: 2)
5| delegatee(...) # CI2 (FORWARDING) | cref_or_me
6| end | specval
7| | type
8| def caller |
9| delegator(1, 2) # CI1 (argc: 2) |
10| end |
```
The CI at `delegatee` on line 5 is tagged as "FORWARDING", so it knows to
memcopy the caller's stack before calling `delegatee`. In this case, it will
memcopy self, 1, and 2 to the stack before calling `delegatee`. It knows how much
memory to copy from the caller because `CI1` contains stack size information
(argc: 2).
Before executing the `send` instruction, we push `...` on the stack. The
`send` instruction pops `...`, and because it is tagged with `FORWARDING`, it
knows to memcopy (using the information in the CI it just popped):
```
== disasm: #<ISeq:delegator@-e:1 (1,0)-(1,39)>
local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1])
[ 1] "..."@0
0000 putself ( 1)[LiCa]
0001 getlocal_WC_0 "..."@0
0003 send <calldata!mid:delegatee, argc:0, FCALL|FORWARDING>, nil
0006 leave [Re]
```
Instruction 001 puts the caller's CI on the stack. `send` is tagged with
FORWARDING, so it reads the CI and _copies_ the callers stack to this stack:
```
Executing Line | Code | Stack
---------------+---------------------------------------+--------
1| def delegatee(a, b) = a + b | self
2| | 1
3| def delegator(...) | 2
4| # | CI1 (argc: 2)
-> 5| delegatee(...) # CI2 (FORWARDING) | cref_or_me
6| end | specval
7| | type
8| def caller | self
9| delegator(1, 2) # CI1 (argc: 2) | 1
10| end | 2
```
The "FORWARDING" call site combines information from CI1 with CI2 in order
to support passing other values in addition to the `...` value, as well as
perfectly forward splat args, kwargs, etc.
Since we're able to copy the stack from `caller` in to `delegator`'s stack, we
can avoid allocating objects.
I want to do this to eliminate object allocations for delegate methods.
My long term goal is to implement `Class#new` in Ruby and it uses `...`.
I was able to implement `Class#new` in Ruby
[here](https://github.com/ruby/ruby/pull/9289).
If we adopt the technique in this patch, then we can optimize allocating
objects that take keyword parameters for `initialize`.
For example, this code will allocate 2 objects: one for `SomeObject`, and one
for the kwargs:
```ruby
SomeObject.new(foo: 1)
```
If we combine this technique, plus implement `Class#new` in Ruby, then we can
reduce allocations for this common operation.
Co-Authored-By: John Hawthorn <john@hawthorn.email>
Co-Authored-By: Alan Wu <XrXr@users.noreply.github.com>
|
|
(https://github.com/ruby/irb/pull/972)
In #934, we changed command calls to return nil only. This PR improves
the behaviour even further by:
- Not echoing the `nil` returned by command calls
- Not overriding previous return value stored in `_` with the
`nil` from commands
https://github.com/ruby/irb/commit/c844176842
|
|
(https://github.com/ruby/reline/pull/726)
https://github.com/ruby/reline/commit/46b30b07c9
|
|
https://github.com/rubygems/rubygems/commit/a552732bed
|
|
https://github.com/rubygems/rubygems/commit/07a5faeb89
|
|
https://github.com/rubygems/rubygems/commit/643e154f32
|
|
https://github.com/rubygems/rubygems/commit/f9fb413a19
|
|
update` commands
This patch adds `--target-rbconfig` option to specify the rbconfig.rb file
for the deployment target platform. This is useful when cross-compiling
gems. At the moment, this option is only available for `extconf.rb`-based
extensions.
https://github.com/rubygems/rubygems/commit/cf2843f7a2
|
|
(https://github.com/ruby/irb/pull/970)
https://github.com/ruby/irb/commit/35de7dacd4
|
|
Namely, when a gem has not previously been installed, and Bundler is
using the compact index API, fund metadata was not getting printed
because the proper delegation was not implemented in the specification
class used by the compact index.
https://github.com/rubygems/rubygems/commit/9ef5139f60
|
|
https://github.com/rubygems/rubygems/commit/f4ce3aae71
|
|
https://github.com/rubygems/rubygems/commit/ed585f2fca
|
|
|
|
Fixed RJIT `and reg+disp32` and `or reg+disp32` operation.
|
|
https://github.com/rubygems/rubygems/commit/7e6e7ccc58
|
|
https://github.com/rubygems/rubygems/commit/8dbe1dbdc7
Co-authored-by: MSP-Greg <Greg.mpls@gmail.com>
|
|
(https://github.com/ruby/reline/pull/724)
https://github.com/ruby/reline/commit/aff1d852bb
|
|
https://github.com/rubygems/rubygems/commit/19a0e3730c
|
|
So that those lockfiles still work with older Bundler versions.
https://github.com/rubygems/rubygems/commit/880275bb66
|
|
binstubs
https://github.com/rubygems/rubygems/commit/076aba8b1c
|
|
https://github.com/ruby/prism/commit/f7faedfb3f
|
|
(https://github.com/ruby/reline/pull/722)
Add xterm key bindings to comprehensive list
Add fallback escape sequence of cursor hide/show
https://github.com/ruby/reline/commit/e3c73bbe26
|
|
terminfo.rb
(https://github.com/ruby/reline/pull/721)
https://github.com/ruby/reline/commit/9da2cbcd82
|
|
|
|
https://github.com/ruby/prism/commit/1528d3c019
|
|
https://github.com/ruby/prism/commit/100340bc6b
|
|
https://github.com/ruby/prism/commit/4a9a7a62af
Co-authored-by: Jason Kim <jasonkim@github.com>
Co-authored-by: Adam Hess <HParker@github.com>
|
|
https://github.com/ruby/error_highlight/commit/8ce3f6f145
|
|
https://github.com/ruby/error_highlight/commit/69fbacfd49
|
|
used in config
https://github.com/rubygems/rubygems/commit/a0af1baa2b
|
|
I don't think we should add more of these.
https://github.com/rubygems/rubygems/commit/9eee9948cc
|
|
https://github.com/rubygems/rubygems/commit/7d1e8be2ce
|