summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2025-03-25[rubygems/rubygems] Remove specs with bad sources when converging dependenciesDavid Rodríguez
https://github.com/rubygems/rubygems/commit/a0f7851451
2025-03-25[rubygems/rubygems] Tweak to check specs size just onceDavid Rodríguez
https://github.com/rubygems/rubygems/commit/4497555023
2025-03-24[rubygems/rubygems] Raise an error in frozen mode if CHECKSUMS entries are ↵David Rodríguez
missing https://github.com/rubygems/rubygems/commit/054a0cd76c Notes: Merged: https://github.com/ruby/ruby/pull/12968
2025-03-24[rubygems/rubygems] Rename block variableDavid Rodríguez
It's a dependency, not a specification. https://github.com/rubygems/rubygems/commit/9d78f5aa14 Notes: Merged: https://github.com/ruby/ruby/pull/12968
2025-03-24[rubygems/rubygems] Add `Specification#lock_name` and use that when dealing ↵David Rodríguez
with checksums https://github.com/rubygems/rubygems/commit/8e2c5748d9 Notes: Merged: https://github.com/ruby/ruby/pull/12968
2025-03-24[rubygems/rubygems] Refactor replacing locked specification path sourcesDavid Rodríguez
Instead of doing an explicit pass, let sources be replaced while checking if specifications are up to date. https://github.com/rubygems/rubygems/commit/676271e804 Notes: Merged: https://github.com/ruby/ruby/pull/12968
2025-03-24[rubygems/rubygems] Refactor replacement of locked path sourcesDavid Rodríguez
Instead of doing an explicit pass to preserve the source from the Gemfile when it's a `Source::Gemspec`, add a special case to our generic source replacement method. https://github.com/rubygems/rubygems/commit/20c8c42380 Notes: Merged: https://github.com/ruby/ruby/pull/12968
2025-03-24[rubygems/rubygems] Remove unnecessary replacement of locked dependencies ↵David Rodríguez
sources The `converge_dependencies` method already replaces the source of the dependency with an equivalent source from the Gemfile if possible. https://github.com/rubygems/rubygems/commit/a449e7ba19 Notes: Merged: https://github.com/ruby/ruby/pull/12968
2025-03-24[rubygems/rubygems] Refactor Path vs Gemspec source comparisonDavid Rodríguez
https://github.com/rubygems/rubygems/commit/58e9bd9962 Notes: Merged: https://github.com/ruby/ruby/pull/12968
2025-03-24[rubygems/rubygems] Refactor replacing sourcesDavid Rodríguez
https://github.com/rubygems/rubygems/commit/4c05ac8306 Notes: Merged: https://github.com/ruby/ruby/pull/12968
2025-03-24[rubygems/rubygems] Remove `spec.source` duplicationDavid Rodríguez
https://github.com/rubygems/rubygems/commit/24523a839e Notes: Merged: https://github.com/ruby/ruby/pull/12968
2025-03-24[rubygems/rubygems] Simplify passing "gemspec" option to path sourcesDavid Rodríguez
https://github.com/rubygems/rubygems/commit/9c6b57c01d Notes: Merged: https://github.com/ruby/ruby/pull/12968
2025-03-24[rubygems/rubygems] Remove unused default valueDavid Rodríguez
https://github.com/rubygems/rubygems/commit/e9f4d1e5c2 Notes: Merged: https://github.com/ruby/ruby/pull/12968
2025-03-24[rubygems/rubygems] Change behavior when gemfile and gemspec dep deps conflictDavid Rodríguez
https://github.com/rubygems/rubygems/commit/7026b5f2e5 Notes: Merged: https://github.com/ruby/ruby/pull/12968
2025-03-24[rubygems/rubygems] Use `name` argument consistentlyDavid Rodríguez
https://github.com/rubygems/rubygems/commit/4e66fe4208 Notes: Merged: https://github.com/ruby/ruby/pull/12968
2025-03-24[rubygems/rubygems] Support git 2.49David Rodríguez
One error message that we parse is now slightly different. https://github.com/rubygems/rubygems/commit/758528791d Notes: Merged: https://github.com/ruby/ruby/pull/12968
2025-03-24[rubygems/rubygems] Default to a SOURCE_DATE_EPOCH of 315619200, to simplify ↵Ellen Marie Dash
reproducible builds. https://github.com/rubygems/rubygems/commit/1d5a627398 Notes: Merged: https://github.com/ruby/ruby/pull/12968
2025-03-24[rubygems/rubygems] Let `gem exec` raise an error in ambiguous casesDavid Rodríguez
When `gem exec foo` is run, and "foo" is a gem that has multiple executables, none of them named "foo", raise an error explaining the situation and telling user to be more specific. Currently the first command in the executables array is run, but this may come as surprising sometimes, so better raise an error. https://github.com/rubygems/rubygems/commit/acda5d8f6e Notes: Merged: https://github.com/ruby/ruby/pull/12968
2025-03-24[rubygems/rubygems] Update vendored pub_grubHartley McGuire
https://github.com/rubygems/rubygems/commit/3aaa75e7b9 Notes: Merged: https://github.com/ruby/ruby/pull/12968
2025-03-24[rubygems/rubygems] Reword log message about current platform being missingDavid Rodríguez
It reads better this way I think. https://github.com/rubygems/rubygems/commit/ce9743290d Notes: Merged: https://github.com/ruby/ruby/pull/12968
2025-03-24[rubygems/rubygems] Improve grammar of some error messagesDavid Rodríguez
https://github.com/rubygems/rubygems/commit/558a4765c7 Notes: Merged: https://github.com/ruby/ruby/pull/12968
2025-03-24[rubygems/rubygems] Consistently use "lockfile" over "lock file"David Rodríguez
https://github.com/rubygems/rubygems/commit/e891be9197 Notes: Merged: https://github.com/ruby/ruby/pull/12968
2025-03-24[rubygems/rubygems] Fix frozen error message incorrectly mentioning the GemfileDavid Rodríguez
It meant to mention the lockfile here. https://github.com/rubygems/rubygems/commit/2f0233a0fb Notes: Merged: https://github.com/ruby/ruby/pull/12968
2025-03-23[ruby/prism] Update Ruby depsKevin Newton
https://github.com/ruby/prism/commit/594e2a69ed
2025-03-22[ruby/prism] Enforce a minimum `parser` version for the parser translatorEarlopain
There hasn't been much that would actually affect parsers usage of it. But, when adding new node types, these usually appear in the `Parser::Meta::NODE_TYPES`. `itblock` was added, gets emitted by prism, and then `rubocop-ast` blindly delegates to `on_itblock`. These methods are dynamically created through `NODE_TYPES`, which means that it will error if it doesn't contain `itblock`. This is unfortunate because in `rubocop-ast` these methods are eagerly defined but the prism translator is lazily loaded on demand. The simplest solution is to add them on the `parser` side (even if they are not emitted directly), and require that a version that contains those be used. In summary when adding a new node type: * Add it to `Parser::Meta::PRISM_TRANSLATION_PARSER_NODE_TYPES` (gets included in `NODE_TYPES`) * Bump the minimum `parser` version used by `prism` to a version that contains the above change * Actually emit that node type in `prism` https://github.com/ruby/prism/commit/d73783d065
2025-03-21[ruby/prism] Don't use `RUBY_VERSION.to_f`Earlopain
There will be a bunch of other problems should 3.10 ever exists, but I guess why not fix this one now. https://github.com/ruby/prism/commit/b385f47f8b
2025-03-20[ruby/prism] Add `Prism::Translation::ParserCurrent`Earlopain
It's not my favorite api but for users that currently use the same thing from `parser`, moving over is more difficult than it needs to be. If you plan to support both old and new ruby versions, you definitly need to branch somewhere on the ruby version to either choose prism or parser. But with prism you then need to enumerate all the versions again and choose the correct one. Also, don't recommend to use `Prism::Translation::Parser` in docs. It's version-less but actually always just uses Ruby 3.4 which is probably not what the user intended. Note: parser also warns when the patch version doesn't match what it expects. But I don't think prism has such a concept, and anyways it would require releases anytime ruby releases, which I don't think is very desirable https://github.com/ruby/prism/commit/77177f9e92
2025-03-19[ruby/prism] Mark Prism as ractor-safeKevin Newton
https://github.com/ruby/prism/commit/c02429765b
2025-03-19[ruby/prism] Polyfill Kernel#warn category parameterKevin Newton
https://github.com/ruby/prism/commit/d85c72a1b9
2025-03-19[ruby/prism] Remove `category` keyword from `warn` callEarlopain
`category` is only supported from Ruby 3.0 onwards and prism can still run with Ruyb 2.7 https://github.com/ruby/prism/commit/335a193851
2025-03-19[ruby/prism] Warn when the parser translator receives an incompatible ↵Earlopain
builder class In https://github.com/ruby/prism/pull/3494 I added a bit of code so that using the new builder doesn't break stuff. This code can be dropped when it is enforced that builder is _always_ the correct subclass (and makes future issues like that unlikely). https://github.com/ruby/prism/commit/193d4b806d
2025-03-19[ruby/optparse] bump up to 0.7.0.dev.2Nobuyoshi Nakada
https://github.com/ruby/optparse/commit/8c2c7a4903
2025-03-18[ruby/prism] Bump to v1.4.0Kevin Newton
https://github.com/ruby/prism/commit/71d31db496
2025-03-18Fix up merge conflicts for prism syncKevin Newton
2025-03-18[ruby/prism] Fix merge mishapEarlopain
Caused by https://github.com/ruby/prism/pull/3478 and https://github.com/ruby/prism/pull/3443 I also made the builder reference more explicit to clearly distinquish between `::Parser` and `Prism::Translation::Parser` https://github.com/ruby/prism/commit/d52aaa75b6
2025-03-18[ruby/prism] Only unnest parser mlhs nodes when no rest argument is providedEarlopain
``` (a,), = [] PARSER==================== s(:masgn, s(:mlhs, s(:mlhs, s(:lvasgn, :a))), s(:array)) PRISM==================== s(:masgn, s(:mlhs, s(:lvasgn, :a)), s(:array)) ``` https://github.com/ruby/prism/commit/8aa1f4690e
2025-03-18[ruby/prism] Fix parser translator multiline interpolated symbolsEarlopain
In https://github.com/ruby/prism/commit/26370079291a420c6b2b7be5cdbd5c609da62f21 I added tests but didn't modify them correctly https://github.com/ruby/prism/commit/de021e74de
2025-03-18[ruby/prism] Further refine string handling in the parser translatorEarlopain
Mostly around newlines and line continuation. * percent arrays need special backslash handling in the ast * Fix offset issue for heredocs with many line continuations (used wrong variable as index access) * More refined rules on when to simplify string tokens * Handle line continuations in squiggly heredocs * Correctly dedent squiggly heredocs with interpolation * Consider `':foo:` and `%s[foo]` to not be interpolation https://github.com/ruby/prism/commit/4edfe9d981
2025-03-18[ruby/prism] Use Set.new over to_setKevin Newton
https://github.com/ruby/prism/commit/422d5c4c64
2025-03-18[ruby/prism] Optimize array inclusion checks in the parser translatorEarlopain
I see `Array.include?` as 2.4% runtime. Probably because of `LPAREN_CONVERSION_TOKEN_TYPES` but the others will be faster as well. Also remove some inline array checks. They are specifically optimized in Ruby since 3.4, but for now prism is for >= 2.7 https://github.com/ruby/prism/commit/ca9500a3fc
2025-03-18[ruby/prism] Fix parser translator crash for certain octal escapesEarlopain
`Integer#chr` performs some validation that we don't want/need. Octal escapes can go above 255, where it will then raise trying to convert. `append_as_bytes` actually allows to pass a number, so we can just skip that call. Although, on older rubies of course we still need to handle this in the polyfill. I don't really like using `pack` but don't know of another way to do so. For the utf-8 escapes, this is not an issue. Invalid utf-8 in these is simply a syntax error. https://github.com/ruby/prism/commit/161c606b1f
2025-03-18[ruby/prism] Handle control and meta escapes in parser translationKevin Newton
https://github.com/ruby/prism/commit/09c59a3aa5
2025-03-18[ruby/prism] Further refine string handling in the parser translatorEarlopain
Mostly around newlines and line continuation. * percent arrays need special backslash handling in the ast * Fix offset issue for heredocs with many line continuations (used wrong variable as index access) * More refined rules on when to simplify string tokens * Handle line continuations in squiggly heredocs * Correctly dedent squiggly heredocs with interpolation * Consider `':foo:` and `%s[foo]` to not be interpolation https://github.com/ruby/prism/commit/4edfe9d981
2025-03-18[ruby/prism] Better handle regexp in the parser translatorEarlopain
Turns out, it was already almost correct. If you disregard \c and \M style escapes, only a single character is allowed to be escaped in a regex so most tests passed already. There was also a mistake where the wrong value was constructed for the ast, this is now fixed. One test fails because of this, but I'm fairly sure it is because of a parser bug. For `/\“/`, the backslash is supposed to be removed because it is a multibyte character. But tbh, I don't entirely understand all the rules. Fixes more than half of the remaining ast differences for rubocop tests https://github.com/ruby/prism/commit/e1c75f304b
2025-03-18[ruby/prism] Fix parser translator tokens for %-arrays with whitespace escapesEarlopain
Also fixes a token incompatibility for the word separator. parser only considers whitespace until the first newline https://github.com/ruby/prism/commit/bd3dd2b62a
2025-03-18[ruby/prism] Fix parser translator edge-case when multiline string ends with \nEarlopain
When the line contains no real newline but contains unescaped ones, then there will be one less entry https://github.com/ruby/prism/commit/4ef093b600
2025-03-18[ruby/prism] Better handle all kinds of multiline strings in the parser ↵Earlopain
translator This is a followup to #3373, where the implementation was extracted https://github.com/ruby/prism/commit/2637007929
2025-03-18[ruby/prism] Fix an incompatibility with the parser translatorEarlopain
The offset cache contains an entry for each byte so it can't be accessed via the string length. Adds tests for all variants except for this: ``` "fo o" "ba ’" ``` For some reason, this still has the wrong offset. https://github.com/ruby/prism/commit/a651126458
2025-03-18[ruby/prism] Fix parser translator rescue location with semicolon bodyEarlopain
There are a few other locations that should be included in that check. I think the end location must always be present but I left it in to be safe (maybe implicit begin somehow?) https://github.com/ruby/prism/commit/545d07ddc3
2025-03-18[ruby/prism] Fix parser translator crash for certain octal escapesEarlopain
`Integer#chr` performs some validation that we don't want/need. Octal escapes can go above 255, where it will then raise trying to convert. `append_as_bytes` actually allows to pass a number, so we can just skip that call. Although, on older rubies of course we still need to handle this in the polyfill. I don't really like using `pack` but don't know of another way to do so. For the utf-8 escapes, this is not an issue. Invalid utf-8 in these is simply a syntax error. https://github.com/ruby/prism/commit/161c606b1f