summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2023-02-09[rubygems/rubygems] Avoid crashing with a corrupted lockfileDaniel Colson
I did a bad thing (script that edits the Gemfile.lock directly) and ended up with a Gemfile.lock that was completely missing some indirect dependencies. While this is my fault and an error is reasonable, I noticed that the error got progressively less friendly in recent versions of bundler. Something similar came up in https://github.com/rubygems/rubygems/issues/6210, and this commit would have helped with that case as well (although we've already handled this a different way with #6219). Details: --- Back on Bundler 2.2.23, a corrupt lockfile like this would cause a helpful error: ``` Unable to find a spec satisfying minitest (>= 5.1) in the set. Perhaps the lockfile is corrupted? ``` Bundler 2.3.26 gave a helpful warning: ``` Warning: Your lockfile was created by an old Bundler that left some things out. Because of the missing DEPENDENCIES, we can only install gems one at a time, instead of installing 16 at a time. You can fix this by adding the missing gems to your Gemfile, running bundle install, and then removing the gems from your Gemfile. The missing gems are: * minitest depended upon by activesupport ``` But then continued on and crashed while trying to report the unmet dependency: ``` --- ERROR REPORT TEMPLATE ------------------------------------------------------- NoMethodError: undefined method `full_name' for nil:NilClass lib/bundler/installer/parallel_installer.rb:127:in `block (2 levels) in check_for_unmet_dependencies' ... ``` Bundler 2.4.0 and up crash as above when jobs=1, but crash even harder when run in parallel: ``` --- ERROR REPORT TEMPLATE ------------------------------------------------------- fatal: No live threads left. Deadlock? 3 threads, 3 sleeps current:0x00007fa6b6704660 main thread:0x00007fa6b6704660 * #<Thread:0x000000010833b130 sleep_forever> rb_thread_t:0x00007fa6b6704660 native:0x0000000108985600 int:0 * #<Thread:0x0000000108dea630@Parallel Installer Worker #0 tmp/1/gems/system/gems/bundler-2.5.0.dev/lib/bundler/worker.rb:90 sleep_forever> rb_thread_t:0x00007fa6b67f67c0 native:0x0000700009a62000 int:0 * #<Thread:0x0000000108dea4a0@Parallel Installer Worker #1 tmp/1/gems/system/gems/bundler-2.5.0.dev/lib/bundler/worker.rb:90 sleep_forever> rb_thread_t:0x00007fa6b67f63c0 native:0x0000700009c65000 int:0 <internal:thread_sync>:18:in `pop' tmp/1/gems/system/gems/bundler-2.5.0.dev/lib/bundler/worker.rb:42:in `deq' ... ``` Changes --- This commit fixes the confusing thread deadlock crash by detecting if dependencies are missing such that we'll never be able to enqueue. When that happens we treat it as a failure so the install can finish. That gets us back to the `NoMethodError`, which this commit fixes by using a different warning in the case where no spec is found. https://github.com/rubygems/rubygems/commit/d73001a21d
2023-02-08[rubygems/rubygems] Improve wording of unmet dependencies warningDaniel Colson
`trying to manually editing` doesn't seem quite grammatically correct. We could change it to `trying to manually edit` (is that a split infinitive?), but I don't think `trying to` adds much here so I've removed it instead so `editing` is the verb. For the list of dependencies, the wording before this commit seemed to reverse the dependency. "B, depended on A" sounds like B depends on A (or did in the past but doesn't anymore?), but that's not correct. I think there's a missing word: "B, depended on by A", but I find "B, dependency of A" a bit nicer. https://github.com/rubygems/rubygems/commit/49a31257e3
2023-02-07[rubygems/rubygems] Add Ruby 3.2 and 3.3 platforms to Gemfile DSLDaniel Colson
Along the same lines as https://github.com/rubygems/rubygems/pull/5469, this adds support for Ruby 3.2 and 3.3 platforms: `:ruby_32`, `mri_32`, etc. It also includes a spec that should help catch this earlier in the future, failing if we don't support platforms for the version of Ruby that is running the tests. https://github.com/rubygems/rubygems/commit/7cd19d824d
2023-02-07[ruby/net-http] Enhanced RDoc for Net::HTTPBurdetteLamar
https://github.com/ruby/net-http/commit/e65a3d9f11
2023-02-07[ruby/net-http] [DOC] Reorganize doc for proxy serverBurdette Lamar
(https://github.com/ruby/net-http/pull/117) https://github.com/ruby/net-http/commit/f8b6b76cba
2023-02-07[ruby/reline] Add comment for unused constantsima1zumi
FILENAME_COMPLETION_PROC and USERNAME_COMPLETION_PROC are not used by Reline. However, they were added for compatibility with the rb-readline gem. These constants have been retained and comments added. https://github.com/ruby/reline/commit/98fdbd3f18
2023-02-06[ruby/rdoc] Actually execute RDoc document task for coveragezzak
https://github.com/ruby/rdoc/commit/7e70d41585
2023-02-06[rubygems/rubygems] Properly exclude gemspec file itself from gemAkira Matsuda
by comparing the file names with full path. Follows up https://github.com/rubygems/rubygems/commit/f444478eaccf https://github.com/rubygems/rubygems/commit/9637a82d2e
2023-02-06[ruby/reline] Fix line rendering when newline is added at the end of the buffertompng
https://github.com/ruby/reline/commit/7d61b3df9a
2023-02-06[ruby/English] Replace HTML5 deprecated tag <tt> with <code>ccmywish
https://github.com/ruby/English/commit/3712fd6752
2023-02-05[rubygems/rubygems] Replace "prior to" with "immediately after"Sam Bostock
Currently, the instructions and placeholder contradict each other. The commit that introduced this placeholder (42bc4715d920e836c8499883d) makes it clear that the placeholder should be replaced AFTER publishing (i.e. once the author successfully claims the gem name on Rubygems), so the placeholder should match. https://github.com/rubygems/rubygems/commit/23e2dea828
2023-02-04* remove trailing spaces. [ci skip]git
2023-02-04[ruby/net-http] [DOC] Enhanced RDoc for Net::HTTPBurdette Lamar
(https://github.com/ruby/net-http/pull/116) https://github.com/ruby/net-http/commit/22c0d34002
2023-02-03[ruby/rdoc] Add newline before returnzzak
https://github.com/ruby/rdoc/commit/6d609cb64c Co-authored-by: Olle Jonsson <olle.jonsson@gmail.com>
2023-02-03[ruby/rdoc] Add rdoc:coverage default taskzzak
https://github.com/ruby/rdoc/commit/157fbaf575
2023-02-03[ruby/net-http] [DOC] Enhanced RDoc for write_timeoutBurdette Lamar
(https://github.com/ruby/net-http/pull/115) https://github.com/ruby/net-http/commit/6da39b0461
2023-02-02[rubygems/rubygems] Fix TarReader::Entry#read/partial to match File#read and ↵Martin Emde
StringIO#read TarReader is used as an IO object, but doesn't behave the same as other implementations. These fixes make `read` and `readpartial` conform to the interface of StringIO and File. https://github.com/rubygems/rubygems/commit/bba32d7217
2023-02-02[ruby/net-http] Remarks on inclusionsBurdetteLamar
https://github.com/ruby/net-http/commit/dfd060c583
2023-02-02[ruby/net-http] [DOC] Enhanced RDoc for HTTPGenericRequestBurdette Lamar
(https://github.com/ruby/net-http/pull/113) https://github.com/ruby/net-http/commit/14c8405702
2023-02-01[rubygems/rubygems] Introduce to specify deprecated version for ↵Hiroshi SHIBATA
rubygems_deprecate_command. We sometimes to remove minor command without bumping major version. This feature helps this deprecation process. https://github.com/rubygems/rubygems/commit/41301cd2a8
2023-01-31[ruby/net-http] Redirection revisionBurdetteLamar
https://github.com/ruby/net-http/commit/9a4e2d3a2a
2023-01-31[ruby/net-http] [DOC] Enhanced RDoc for Net::HTTPBurdette Lamar
(https://github.com/ruby/net-http/pull/110) https://github.com/ruby/net-http/commit/b098caa5e4
2023-01-31Manually merged https://github.com/ruby/net-http/pull/106Hiroshi SHIBATA
Co-authored-by: Peter Zhu <peter@peterzhu.ca> Co-authored-by: BurdetteLamar <burdettelamar@yahoo.com>
2023-01-31Merge RubyGems/Bundler master.Hiroshi SHIBATA
Pick from https://github.com/rubygems/rubygems/commit/5ace20dbecfeaf09fba5f616193f3cfcff70ba00 Notes: Merged: https://github.com/ruby/ruby/pull/7203
2023-01-31[rubygems/rubygems] Allow disabling RubyGems require decorationsDavid Rodríguez
Currently Bundler needs to do cumbersome operations to revert custom RubyGems require on a `bundler/setup` context. This causes issues when third party gems also monkeypatch require, since Bundler will also undo those decorations. This commit allows it to use the simpler approach of properly telling RubyGems that it needs to default to built-in require without any extra magic. https://github.com/rubygems/rubygems/commit/1df5009e14 Co-authored-by: Xavier Noria <fxn@hashref.com> Notes: Merged: https://github.com/ruby/ruby/pull/7203
2023-01-31[rubygems/rubygems] Fix issue with extensions not compiling properly using ↵Tim Bates
inline gemfile https://github.com/rubygems/rubygems/commit/fa6e6ea95c Notes: Merged: https://github.com/ruby/ruby/pull/7203
2023-01-31[ruby/reline] Splat is always an ArrayÉtienne Barrié
https://github.com/ruby/reline/commit/82095bd62b
2023-01-30[rubygems/rubygems] normalise manifest path from cargo on windowsMat Sadler
https://github.com/rubygems/rubygems/commit/23b5ca5fc4
2023-01-30[rubygems/rubygems] better error message if cargo metadata doesn't contain ↵Mat Sadler
the package we expect https://github.com/rubygems/rubygems/commit/cb7e6d1577
2023-01-30[rubygems/rubygems] install rust extensions into expected directory nestingMat Sadler
https://github.com/rubygems/rubygems/commit/85ea86d348
2023-01-30[rubygems/rubygems] use cargo to get crate nameMat Sadler
the final copying of the extension into place has been slimmed down, reflecting that it only needs to copy a single file, rather than replicating the more involved process used for a C ext this also refactors #build so that #cargo_crate_name only needs to be called once, and hopefully the build flow is easier to understand https://github.com/rubygems/rubygems/commit/5a0d7f2e6c
2023-01-30[rubygems/rubygems] don't force Cargo.lock to be in gem rootMat Sadler
https://github.com/rubygems/rubygems/commit/371044c0ab
2023-01-28[ruby/net-http] Correct doc errorBurdetteLamar
https://github.com/ruby/net-http/commit/dc006d8419
2023-01-27[rubygems/rubygems] Don't warn on bundler binstubs --standalone --allDaniel Colson
Prior to this commit `bundle binstubs --standalone --all` would output a warning about not being able to generate a standalone binstub for bundler. This warning predates the `--all` option, and I don't think it makes sense in this context. The warning makes good sense when explicitly trying to generate a bundler standalone binstub with `bundle binstubs bundler --standalone`, since that command won't do what the user might have expected. But `--all` is not specifically asking for bundler, and having it report each time that the bundler binstubs could not be generated does not seem particularly helpful. The only way to make that warning go away would be to stop using `--standalone --all`. This commit skips the warning when running with the `--all` option. https://github.com/rubygems/rubygems/commit/e6a72e19eb
2023-01-27[rubygems/rubygems] Update the list of SPDX licence identifiersSamuel Giddins
https://github.com/rubygems/rubygems/commit/18a9b0dc7e
2023-01-27[ruby/syntax_suggest] Hide internal document and detail of `Kernel` monkey ↵Nobuyoshi Nakada
patching https://bugs.ruby-lang.org/issues/19285 https://github.com/ruby/syntax_suggest/commit/25ca82f8f9
2023-01-26[rubygems/rubygems] Deprecate Gem::ListSamuel Giddins
It is unused, we will remove it in the next major version https://github.com/rubygems/rubygems/commit/c3f6c27d6d
2023-01-26[ruby/reline] Revert "correct Win32API capitalization for JRuby"Hiroshi SHIBATA
This reverts commit https://github.com/ruby/reline/commit/d6e7c9e1d9af. https://github.com/ruby/reline/commit/c47a5b684c
2023-01-23[rubygems/rubygems] blade is hosted under ruby-lang.org nowHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/00fdef8a41
2023-01-23[ruby/cgi] blade is hosted under ruby-lang.org nowHiroshi SHIBATA
https://github.com/ruby/cgi/commit/826ba3140c
2023-01-20Add `offsetof` so we can get the offset of membersAaron Patterson
I want to get the offset of fields inside structs, but I don't want to instantiate the struct. I need to embed the offsets inside machine code, and I can't get the offsets without calling `new` on the struct. This commit adds an `offset` method so you can get the offset of a member without instantiating anything. You can do: ```ruby C.rb_control_frame_t.offsetof(:sp) #=> 8 ``` I don't think this implementation is perfect, you can only get immediate fields. But it is better than nothing! Notes: Merged: https://github.com/ruby/ruby/pull/7163
2023-01-20[ruby/reline] accept new_indent > cursor_maxtompng
https://github.com/ruby/reline/commit/61cc580da4
2023-01-20[rubygems/rubygems] Update bundle-exec man page for with_unbundled_envJosh Nichols
`with_clean_env` has been deprecated in `with_unbundled_env`. It already generates a deprecation warning when it uses, but this man page was still referring to it.
2023-01-19[ruby/net-http] [DOC] Header docBurdette Lamar
(https://github.com/ruby/net-http/pull/104) https://github.com/ruby/net-http/commit/3308362d9b
2023-01-18[ruby/net-http] [DOC] Enhanced RDoc for set_formBurdette Lamar
(https://github.com/ruby/net-http/pull/103) https://github.com/ruby/net-http/commit/f6506ff889
2023-01-18[ruby/reline] Add constant MINIMUM_SCROLLBAR_HEIGHT for scrollbar rendering ↵tompng
when dialog content is very long https://github.com/ruby/reline/commit/d4c95f89ec
2023-01-18[ruby/reline] Fix dialog scrollbar rendering position and disappearing bugtompng
https://github.com/ruby/reline/commit/e21b69ade4
2023-01-14[ruby/irb] Store context in RubyLexStan Lo
Some background for this refactor: 1. Through a RubyLex instance's lifetime, the context passed to its methods should be the same. Given that `Context` is only initialised in `Irb#initialize`, this should be true. 2. When `RubyLex` is initialised, the context object should be accessible. This is also true in all 3 of `RubyLex.new`'s invocations. With the above observations, we should be able to store the context in `RubyLex` as an instance variable. And doing so will make `RubyLex`'s instance methods easier to use and maintain. https://github.com/ruby/irb/commit/5c8d3df2df
2023-01-13[ruby/error_highlight] Identify which node in `Foo::Bar::Baz` causes a NameErrorYusuke Endoh
In Ruby 3.2 or later, a nested constant access like `Foo::Bar::Baz` is compiled to one instruction by the optimization https://github.com/ruby/ruby/pull/6187 We try to spot which sub-node caues a NameError in question based on the constant name. We will give up if the same constant name is accessed in a nested access (`Foo::Foo`). Fixes https://github.com/ruby/error_highlight/pull/31 https://github.com/ruby/error_highlight/commit/0a4db7da0a
2023-01-12[ruby/irb] Avoid calling private methods on the main objectStan Lo
(https://github.com/ruby/irb/pull/498) When the main object is frozen, `IRB` wraps a `SimpleDelegator` around it. But because `SimpleDelegator` doesn't delegate private methods, methods like `require_relative` or `const_get` would cause error, which are needed for lazily loading commands. This commit works around this limitation by avoiding those private method calls when setting up command execution.