summaryrefslogtreecommitdiff
path: root/spec
AgeCommit message (Collapse)Author
2024-07-17[rubygems/rubygems] Fix another case of `bundle lock --add-platform` doing ↵David Rodríguez
nothing https://github.com/rubygems/rubygems/commit/0629e27dda
2024-07-12Pend some tests because these are not working with macOS 15 beta and Xcode ↵Hiroshi SHIBATA
16 beta
2024-07-11Do not warn about extra `format` argument when passed as keywordsJean Boussier
[Bug #20593] It's fairly common to use `format` to interpolate a number of values into a user provided strings. The arguments not matching are a problem when they are positional, but when they are named, it's absolutely fine and we shouldn't emit a warning.
2024-07-10[rubygems/rubygems] Fix another strange error when running `bundle add` in ↵David Rodríguez
frozen mode If there's a lockfile, but it's out of sync with the Gemfile because a dependency has been deleted, and frozen mode is set, Bundler will print the following strange error: ``` $ bundle add rake , but the lockfile can't be updated because frozen mode is set You have deleted from the Gemfile: * rake (~> 13.2) Run `bundle install` elsewhere and add the updated Gemfile to version control. ``` This commit changes the error to: ``` Some dependencies were deleted from your gemfile, but the lockfile can't be updated because frozen mode is set You have deleted from the Gemfile: * rake (~> 13.2) Run `bundle install` elsewhere and add the updated Gemfile to version control. ``` https://github.com/rubygems/rubygems/commit/452da4048d
2024-07-10[rubygems/rubygems] Fix strange error when running `bundle add` with frozen ↵David Rodríguez
mode set If Gemfile is empty and there's no lockfile (situation after `bundle init`), and `frozen` is configured, running `bundle add` will result in an strange error, like this: ``` $ bundle add rake , but the lockfile can't be updated because frozen mode is set You have deleted from the Gemfile: * rake (~> 13.2) Run `bundle install` elsewhere and add the updated Gemfile to version control. ``` This commit fixes the problem to instead print https://github.com/rubygems/rubygems/commit/152331a9dc
2024-07-09[rubygems/rubygems] Fix generic platform gems getting incorrectly removed ↵David Rodríguez
when locked for a specific platform If they are already in the lockfile as the most specific variant for a platform, we shouldn't change that unless explicitly unlocking. https://github.com/rubygems/rubygems/commit/a901660498
2024-07-09[rubygems/rubygems] Resolve all platforms directlyDavid Rodríguez
Instead of having to do a complete pass after resolve. To do this, we add to the ruby group all the platform specs with the same dependencies as the ruby specs. https://github.com/rubygems/rubygems/commit/e50415f2a6
2024-07-09[rubygems/rubygems] Instantiate `Resolver::SpecGroup` with explicit priorityDavid Rodríguez
https://github.com/rubygems/rubygems/commit/e2c1bc1b6c
2024-07-09[rubygems/rubygems] Let resolver consider unique specs from the beginningDavid Rodríguez
It results in more consistent error messages. https://github.com/rubygems/rubygems/commit/a4b34361cc
2024-07-09[rubygems/rubygems] Fix spec to also pass outside of LinuxDavid Rodríguez
https://github.com/rubygems/rubygems/commit/fc8c853345
2024-07-09[rubygems/rubygems] Minor Bundler spec improvementsDavid Rodríguez
While working on something else I noticed: * Usage of uppercased "RUBY" and "JAVA" as platforms, when those don't really exist. * Usage of some test gems with "1.0" as gemspec version and "1.0.0" as actual version. This commit fixes both inconsistencies to make things more expectable. https://github.com/rubygems/rubygems/commit/e3ec32e247
2024-07-09[rubygems/rubygems] Test using latest rubiesDavid Rodríguez
https://github.com/rubygems/rubygems/commit/6d6646b8bc
2024-07-08Implement Hash.new(capacity:)Jean Boussier
[Feature #19236] When building a large hash, pre-allocating it with enough capacity can save many re-hashes and significantly improve performance. ``` /opt/rubies/3.3.0/bin/ruby --disable=gems -rrubygems -I./benchmark/lib ./benchmark/benchmark-driver/exe/benchmark-driver \ --executables="compare-ruby::../miniruby-master -I.ext/common --disable-gem" \ --executables="built-ruby::./miniruby --disable-gem" \ --output=markdown --output-compare -v $(find ./benchmark -maxdepth 1 -name 'hash_new' -o -name '*hash_new*.yml' -o -name '*hash_new*.rb' | sort) compare-ruby: ruby 3.4.0dev (2024-03-25T11:48:11Z master f53209f023) +YJIT dev [arm64-darwin23] last_commit=[ruby/irb] Cache RDoc::RI::Driver.new (https://github.com/ruby/irb/pull/911) built-ruby: ruby 3.4.0dev (2024-03-25T15:29:40Z hash-new-rb 77652b08a2) +YJIT dev [arm64-darwin23] warming up... | |compare-ruby|built-ruby| |:-------------------|-----------:|---------:| |new | 7.614M| 5.976M| | | 1.27x| -| |new_with_capa_1k | 13.931k| 15.698k| | | -| 1.13x| |new_with_capa_100k | 124.746| 148.283| | | -| 1.19x| ```
2024-07-06Raise a TypeError for Thread#thread_variable{?,_get} for non-symbolJeremy Evans
Previously, a TypeError was not raised if there were no thread variables, because the conversion to symbol was done after that check. Convert to symbol before checking for whether thread variables are set to make the behavior consistent. Fixes [Bug #20606]
2024-07-05[rubygems/rubygems] Use preferred add_dependency instead of ↵Jerome Dalbert
add_runtime_dependency https://github.com/rubygems/rubygems/commit/9a08043858
2024-07-02[rubygems/rubygems] Only allow valid values for --test, --ci, and --linter ↵Jerome Dalbert
options https://github.com/rubygems/rubygems/commit/d4360c9032
2024-07-02[rubygems/rubygems] Only remove current platform when added right before ↵David Rodríguez
resolution If it has been explicitly added by `bundle lock --add-platform`, we don't want to remove it. https://github.com/rubygems/rubygems/commit/09cf921dd6
2024-07-02[rubygems/rubygems] Normalize dummy test server nameDavid Rodríguez
https://github.com/rubygems/rubygems/commit/18b38ca6b4
2024-07-02Update to ruby/spec@f8987acAndrew Konchin
2024-06-28Synchronize Bundler & RubyGems (#11071)David Rodríguez
2024-06-28[rubygems/rubygems] Avoid concurrent builds of Bundler when running specsDavid Rodriguez
Instead, build it during setup when in CI. This should avoid some Windows specific test failures when Bundler copies the same files from multiple processes and runs into EACESS errors. https://github.com/rubygems/rubygems/commit/c194a1d753
2024-06-27[rubygems/rubygems] Print a proper error when bin dir does not have writable ↵David Rodríguez
permission bit https://github.com/rubygems/rubygems/commit/979cd898f9
2024-06-27[rubygems/rubygems] Reword some specs to disambiguate `chmod -x` from `chmod -w`David Rodríguez
https://github.com/rubygems/rubygems/commit/2954ab79a9
2024-06-26[rubygems/rubygems] Add --no-test, --no-ci, and --no-linter optionsJerome Dalbert
https://github.com/rubygems/rubygems/commit/f58660ffcc
2024-06-25[rubygems/rubygems] Only validate resolution info in BundlerThomas Marshall
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
2024-06-25Allow ambiguosity of `return` lineNobuyoshi Nakada
2024-06-25[Bug #20457] Do not remove final `return` nodeNobuyoshi Nakada
This was an optimization for versions prior to 1.9 that traverse the AST at runtime.
2024-06-20Skip 3 specs when $HOME is not a valid directoryJeremy Evans
If $HOME isn't a valid directory, these specs fail, but I think it is better to skip in this case, as it does not indicate a bug. This fixes specs when run in the OpenBSD port, which sets $HOME to an invalid directory to ensure that software's build system is not accidentally relying on it.
2024-06-20[rubygems/rubygems] Fix credentials being readded when re-resolving without ↵David Rodríguez
a full unlock https://github.com/rubygems/rubygems/commit/a8670e43f8
2024-06-20[rubygems/rubygems] Fix `bundle update <gem_name>` edge caseDavid Rodríguez
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
2024-06-20[rubygems/rubygems] Move constant to the proper placeDavid Rodríguez
https://github.com/rubygems/rubygems/commit/9f08241d01
2024-06-20[rubygems/rubygems] Don't validate local gemspec twiceDavid Rodríguez
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
2024-06-20[rubygems/rubygems] Make sure to not re-resolve when a not fully specific ↵David Rodríguez
local platform is locked https://github.com/rubygems/rubygems/commit/36a02c6128
2024-06-20[rubygems/rubygems] Always resolve against the local platformDavid Rodríguez
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
2024-06-20[rubygems/rubygems] Revert to splitting parser due to performance regressionMartin Emde
* 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
2024-06-19[rubygems/rubygems] Use get_byte_ranges instead of byte_rangesHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/5c2ad44c18
2024-06-18[rubygems/rubygems] Fix `bundle fund` when the gemfile contains optional groupsEarlopain
`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
2024-06-18net-ftp-0.3.6 always return response with put/puttextfile.Hiroshi SHIBATA
* https://github.com/ruby/net-ftp/pull/34 * https://github.com/ruby/net-ftp/issues/36
2024-06-14[rubygems/rubygems] Fix funding metadata not being printed in some situationsDavid Rodríguez
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
2024-06-14[rubygems/rubygems] Don't print bug report template when bin dir is not writableDavid Rodríguez
https://github.com/rubygems/rubygems/commit/f4ce3aae71
2024-06-14respect `--error-output stderr` on parallel modeKoichi Sasada
`MultiFormatter#print_exception` should respect `--error-output stderr`.
2024-06-12[rubygems/rubygems] Fix test descriptionGabriel Sobrinho
https://github.com/rubygems/rubygems/commit/4bcdb854a2
2024-06-12Kernel#warn: don't call `Warning.warn` unless the category is enabledJean Boussier
[Bug #20573] Followup: https://github.com/ruby/ruby/pull/10960 I believe `Kernel#warn` should behave in the same way than internal `rb_warning_* APIs
2024-06-12[rubygems/rubygems] Fix typoDavid Rodríguez
https://github.com/rubygems/rubygems/commit/19a0e3730c
2024-06-12`File.umask` does not make sense on WindowsNobuyoshi Nakada
2024-06-12'SPEC_TEMP_DIR` should not be world-writableKoichi Sasada
`SPEC_TEMP_DIR` is not present until `tmp()` method is called on parallel run. In this case `tmp()` is called with `File.umask = 0`. This patch makes `SPEC_TEMP_DIR` before `File.umask = 0`. To solve the issue essentially, I think `SPEC_TEMP_DIR` should be prepared at the beginning of parallel process.
2024-06-11[rubygems/rubygems] Keep credentials in lockfile if they are already thereDavid Rodríguez
So that those lockfiles still work with older Bundler versions. https://github.com/rubygems/rubygems/commit/880275bb66
2024-06-11[PRISM] Make prism pass bundler specsKevin Newton
2024-06-11[rubygems/rubygems] Auto switch to locked bundler version even when using ↵David Rodríguez
binstubs https://github.com/rubygems/rubygems/commit/076aba8b1c
2024-06-11check `SPEC_TEMP_DIR` is world-writable or notKoichi Sasada
``` 1) Dir.mktmpdir when passed a block yields the path to the passed block ERROR ArgumentError: parent directory is world writable but not sticky: /tmp/rubytest.wlu5cs_11 /tmp/ruby/src/trunk/lib/tmpdir.rb:113:in 'Dir.mktmpdir' /tmp/ruby/src/trunk/spec/ruby/library/tmpdir/dir/mktmpdir_spec.rb:39:in 'block (2 levels) in <top (required)>' ``` This weird error comes from world-writable (and not sticky) directory of `SPEC_TEMP_DIR`. This patch checks `SPEC_TEMP_DIR` is not world-writable if exists and `File.umask` contains o+w mask.