Граф коммитов

80435 Коммитов

Автор SHA1 Сообщение Дата
Yusuke Endoh efd58f19ea Expand macro branches to make them plain 2023-10-24 12:22:53 +09:00
Yusuke Endoh 25ef8d262a Refactor GETADDRINFO_IMPL instead of GETADDRINFO_EMU
This is a preparation for introducing cancellable
getaddrinfo/getnameinfo.
2023-10-24 12:22:53 +09:00
Yusuke Endoh 9ce607a8d4 refactor a call to getaddrinfo 2023-10-24 12:22:53 +09:00
Samuel Williams 30f5a2bbcd [ruby/io-nonblock] Don't define nonblock methods if they are defined by core.
https://github.com/ruby/io-nonblock/commit/5d3991859c
2023-10-23 22:53:00 +00:00
Jemma Issroff 39207b496e [PRISM] Implement compilation for PreExecutionNodes 2023-10-23 13:22:55 -07:00
Jemma Issroff 5abff9dbff [PRISM] Add PM_PUTNIL macro 2023-10-23 13:22:55 -07:00
Jemma Issroff 7c4e3ca27b [PRISM] Fix AssocSplat node
This commit emits the correct instructions for hashes which have
both AssocSplat and Assoc nodes contained within them
2023-10-23 13:15:52 -07:00
dearblue 062d6050b0 [rubygems/rubygems] Ignore non-tar format `.gem` files during search
Previously, `rake install` or `rake update` would fail if there was a non-tar format `.gem` file in the current working directory.

https://github.com/rubygems/rubygems/commit/f562788f1d
2023-10-23 19:52:22 +00:00
Jemma Issroff 60196b4780 [PRISM] Fix __LINE__ to be 1-indexed by default 2023-10-23 13:59:48 -03:00
Jemma Issroff f9e122b3d6 [PRISM] Add several tests 2023-10-23 13:59:48 -03:00
Jemma Issroff 62c674f98c [PRISM] Fix compilation for IfNode, UnlessNode
This properly implements the branch condition for FlipFlopNodes on
If / UnlessNodes, and also fixes the bug in UnlessNodes
2023-10-23 12:37:50 -03:00
Jemma Issroff 296da1a2b8
[PRISM] Add tests for BlockNode, BlockLocalVariableNode, BlockParamet… (#8725)
[PRISM] Add tests for BlockNode, BlockLocalVariableNode, BlockParametersNode
2023-10-23 12:30:38 -03:00
Mau Magnaguagno f20e91fbf7 [ruby/prism] Avoid String#chars in DedentingHeredoc#to_a
Prefer String#[] directly.

https://github.com/ruby/prism/commit/916f991220
2023-10-23 14:56:18 +00:00
Nobuyoshi Nakada bf93ceb26b
Set date in message to the latest gem date [ci skip] 2023-10-23 23:13:55 +09:00
Nobuyoshi Nakada ef5717d923
Use outputs instead of outcome with continue-on-error [ci skip]
Suppress exit code annotations.
2023-10-23 23:13:55 +09:00
Benoit Daloze f82d0ab5d1 [ruby/prism] Exclude comments when only serializing semantic fields
https://github.com/ruby/prism/commit/6f4fab362e
2023-10-23 12:50:14 +00:00
Nobuyoshi Nakada 42c2c8caa5
Adjust indent [ci skip] 2023-10-23 19:28:14 +09:00
Nobuyoshi Nakada 839b763119 Use named reference for dyna_push 2023-10-23 17:40:33 +09:00
Nobuyoshi Nakada 7e80f0b5a2 Extract p_in_kwarg to save and update lexer contexts 2023-10-23 17:40:33 +09:00
Nobuyoshi Nakada 428f9f5dc0 Move push_pvtbl and push_pktbl in nterms 2023-10-23 17:40:33 +09:00
Nobuyoshi Nakada 3b05238289 Extract p_assoc and p_in to save lexer contexts 2023-10-23 17:40:33 +09:00
Hiroshi SHIBATA df5bf5bb59
Removed unnecessary libraries of sync_tool 2023-10-23 17:28:50 +09:00
Hiroshi SHIBATA 9844371c6f
sync_tool is unnecessary now.
We can use https://github.com/ruby/test-unit-ruby-core for testing the default gems.
2023-10-23 17:22:27 +09:00
ydah e6fcf07a6f Use `-H` option instead of `-h` option
Follow up: https://github.com/ruby/lrama/pull/139
2023-10-23 17:04:27 +09:00
Hiroshi SHIBATA 8942c73e6a [rubygems/rubygems] Disabled Style/HashSyntax for keyword arguments
https://github.com/rubygems/rubygems/commit/9b61b33568
2023-10-23 07:59:08 +00:00
Jean Boussier e5364ea496 rb_shape_transition_shape_capa: use optimal sizes transitions
Previously the growth was 3(embed), 6, 12, 24, ...

With this change it's now 3(embed), 8, 16, 32, 64, ... by default.

However, since power of two isn't the best size for all allocators,
if `malloc_usable_size` is vailable, we use it to discover the best
offset.

On Linux/glibc 2.35 for instance, the growth will be 3(embed), 7, 15, 31
to avoid wasting 8B per object.

Test program:

```c

size_t test(size_t slots) {
    size_t allocated = slots * VALUE_SIZE;
    void *test_ptr = malloc(allocated);
    size_t wasted = malloc_usable_size(test_ptr) - allocated;
    free(test_ptr);
    fprintf(stderr, "slots = %lu, wasted_bytes = %lu\n", slots, wasted);
    return wasted;
}

int main(int argc, char *argv[]) {
    size_t best_padding = 0;
    size_t padding = 0;
    for (padding = 0; padding <= 2; padding++) {
        size_t wasted = test(8 - padding);
        if (wasted == 0) {
            best_padding = padding;
            break;
        }
    }

    size_t index = 0;
    fprintf(stderr, "=============== naive ================\n");

    size_t list_size = 4;
    for (index = 0; index < 10; index++) {
        test(list_size);
        list_size *= 2;
    }

    fprintf(stderr, "=============== auto-padded (-%lu) ================\n", best_padding);

    list_size = 4;
    for (index = 0; index < 10; index ++) {
        test(list_size - best_padding);
        list_size *= 2;
    }

    fprintf(stderr, "\n\n");
    return 0;
}
```

```
===== glibc ======
slots = 8, wasted_bytes = 8
slots = 7, wasted_bytes = 0
=============== naive ================
slots = 4, wasted_bytes = 8
slots = 8, wasted_bytes = 8
slots = 16, wasted_bytes = 8
slots = 32, wasted_bytes = 8
slots = 64, wasted_bytes = 8
slots = 128, wasted_bytes = 8
slots = 256, wasted_bytes = 8
slots = 512, wasted_bytes = 8
slots = 1024, wasted_bytes = 8
slots = 2048, wasted_bytes = 8
=============== auto-padded (-1) ================
slots = 3, wasted_bytes = 0
slots = 7, wasted_bytes = 0
slots = 15, wasted_bytes = 0
slots = 31, wasted_bytes = 0
slots = 63, wasted_bytes = 0
slots = 127, wasted_bytes = 0
slots = 255, wasted_bytes = 0
slots = 511, wasted_bytes = 0
slots = 1023, wasted_bytes = 0
slots = 2047, wasted_bytes = 0
```

```
==========  jemalloc =======
slots = 8, wasted_bytes = 0
=============== naive ================
slots = 4, wasted_bytes = 0
slots = 8, wasted_bytes = 0
slots = 16, wasted_bytes = 0
slots = 32, wasted_bytes = 0
slots = 64, wasted_bytes = 0
slots = 128, wasted_bytes = 0
slots = 256, wasted_bytes = 0
slots = 512, wasted_bytes = 0
slots = 1024, wasted_bytes = 0
slots = 2048, wasted_bytes = 0
=============== auto-padded (-0) ================
slots = 4, wasted_bytes = 0
slots = 8, wasted_bytes = 0
slots = 16, wasted_bytes = 0
slots = 32, wasted_bytes = 0
slots = 64, wasted_bytes = 0
slots = 128, wasted_bytes = 0
slots = 256, wasted_bytes = 0
slots = 512, wasted_bytes = 0
slots = 1024, wasted_bytes = 0
slots = 2048, wasted_bytes = 0
```
2023-10-23 09:33:15 +02:00
David Rodríguez e7d845b1d0
[rubygems/rubygems] Restore using old way of passing Ruby version to resolver
We used `Bundler::RubyVersion.system.gem_version` for a long time, but I
changed this to `Gem.ruby_version` at
https://github.com/rubygems/rubygems/commit/94f96439438e. It's unclear why I did that
though since I believe it was unrelated to the fix in there.

Bootboot patches `Bundler::RubyVersion` to customize how Bundler works
with Ruby versions, and that change broke that.

Since it's unclear to me how to achieve what Bootboot is doing with the
current code, and there was no strong reason for the change, let's
restore it for now.

https://github.com/rubygems/rubygems/commit/8ec36c6017
2023-10-23 13:59:01 +09:00
Martin Emde 6dcd4e90d8
[rubygems/rubygems] Handle base64 encoded checksums in lockfile for future compatibility.
Save checksums using = as separator.

https://github.com/rubygems/rubygems/commit/a36ad7d160
2023-10-23 13:59:01 +09:00
Martin Emde c667de72ff
[rubygems/rubygems] Improve errors and register checksums reliably
Improve error reporting for checksums, raises a new error class.

Solve for multi-source checksum errors.

Add CHECKSUMS to tool/bundler/(dev|standard|rubocop)26_gems.rb

https://github.com/rubygems/rubygems/commit/26ceee0e76

Co-authored-by: Samuel Giddins <segiddins@segiddins.me>
2023-10-23 13:59:01 +09:00
Martin Emde 6362bfdc33
[rubygems/rubygems] rename Index#== to Index#subset?
https://github.com/rubygems/rubygems/commit/a96a561087
2023-10-23 13:59:01 +09:00
Martin Emde 92f23a48e3
[rubygems/rubygems] Refactor Checksum classes and methods to reduce
code.
(https://github.com/rubygems/rubygems/pull/6917)

https://github.com/rubygems/rubygems/commit/2238bdaadc
2023-10-23 13:59:01 +09:00
Samuel Giddins c5fd94073f
[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
2023-10-23 13:59:01 +09:00
Mercedes Bernard 69d7e9a12e
[rubygems/rubygems] Use the server checksum, then calculate from gem on disk if possible
1. Use the checksum provided by the server if provided: provides security
knowing if the gem you downloaded matches the gem on the server

2. Calculate the checksum from the gem on disk: provides security knowing
if the gem has changed between installs

3. In some cases, neither is possible in which case we don't put anything
in the checksum and we maintain functionality as it is today

Add the checksums to specs in the index if we already have them

Prior to checksums, we didn't lose any information when overwriting specs
in the index with stubs. But now when we overwrite EndpointSpecifications
or RemoteSpecifications with more generic specs, we could lose checksum
info. This manually sets checksum info so we keep it in the index.

https://github.com/rubygems/rubygems/commit/de00a4f153
2023-10-23 13:59:01 +09:00
Thong Kuah ad08674d8d
[rubygems/rubygems] Add CHECKSUMS for each gem in lockfile
We lock the checksum for each resolved spec under a new CHECKSUMS
section in the lockfile.

If the locked spec does not resolve for the local platform, we preserve
the locked checksum, similar to how we preserve specs.

Checksum locking only makes sense on install. The compact index
information is only available then.

https://github.com/rubygems/rubygems/commit/bde37ca6bf
2023-10-23 13:59:01 +09:00
yui-knk 2d468358a5 Lrama v0.5.7 2023-10-23 13:14:15 +09:00
dependabot[bot] dd9b4851a3 Bump ruby/setup-ruby from 1.156.0 to 1.157.0
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.156.0 to 1.157.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Commits](5cfe23c062...a05e47355e)

---
updated-dependencies:
- dependency-name: ruby/setup-ruby
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-22 19:54:46 -07:00
Martin Emde 1146826948 [rubygems/rubygems] Fix spelling of extraneous
https://github.com/rubygems/rubygems/commit/af61829432
2023-10-22 20:17:44 +00:00
Kouhei Yanagita b84e6fe93e
[DOC] Mention the omission of a superclass when reopening a class 2023-10-22 20:12:16 +09:00
Yuki Tsujimoto e721a7aec7
[DOC] Update documentation for typical implementation of hash 2023-10-22 09:47:22 +00:00
Nobuyoshi Nakada 7578bc35f9 [ruby/io-console] Intersperse Win32 and termios implementations
So that the both sources appear in RDoc generated HTMLs.

https://github.com/ruby/io-console/commit/beec164a47
2023-10-22 03:18:34 +00:00
git 0f02a86a3d Update default gems list at 8c0c7be65b [ci skip] 2023-10-22 02:31:44 +00:00
Nobuyoshi Nakada 8c0c7be65b [ruby/io-console] Start 0.6.1
https://github.com/ruby/io-console/commit/06307a755d
2023-10-22 02:30:39 +00:00
Nobuyoshi Nakada c7731b35eb
[ruby/io-console] [DOC] Split .document files to sync with ruby/ruby
https://github.com/ruby/io-console/commit/13e0bcac9f
2023-10-22 11:09:06 +09:00
Nobuyoshi Nakada 9e93af5329 Skip RBS `RbConfig::TOPDIR` test that is `nil` before installation 2023-10-22 08:44:52 +09:00
Nobuyoshi Nakada 0ca5182ae5 RBS no longer has test/stdlib/Prime_test.rb 2023-10-22 08:44:52 +09:00
Nobuyoshi Nakada f717faac63 Update rbs revision to test 2023-10-22 08:44:52 +09:00
Nobuyoshi Nakada cabf3dac36 [ruby/io-console] [DOC] Add .document
https://github.com/ruby/io-console/commit/62a677b51a
2023-10-21 22:58:43 +00:00
Martin Emde 499e66d05c [rubygems/rubygems] Gem::NameTuple equality ignores Gem::Platform/string platform variation
https://github.com/rubygems/rubygems/commit/49aaa46708
2023-10-21 20:35:34 +00:00
Stan Lo 745879b5ed [ruby/irb] Minor refactors around irb.rb
(https://github.com/ruby/irb/pull/736)

* Remove dead method

* Simplify IRB.version

* Move private Irb methods together

* Centralise @CONF initialization/assignment in init.rb

* Move attr_* calls above initialize method

https://github.com/ruby/irb/commit/cf23be4395
2023-10-21 18:06:00 +00:00
Nobuyoshi Nakada 361bce8d2c
[Bug #19967] Ignore library before build 2023-10-21 23:47:29 +09:00