| Age | Commit message (Collapse) | Author |
|
|
|
This is a first pass to improve the way errors are handled and raised in
bundler's tests. The goal is to clean up tests and modernize them -
these were some obvious areas that could be cleaned up.
- Instead of raising "ZOMG" in the load error tests, it now tests for
the actual error and gem raising.
- Improve error messages where applicable.
- All errors raise a specific error class, rather than falling back to a
default and just setting a message.
- Removed arguments and `bundle_dir` option from `TheBundle` class as it wasn't
actually used so therefore we don't need to raise an error for extra
arguments.
- Removed error from `BundlerBuilder`, as it won't work if it's not
`bundler`, also it never uses `name`. The only reaon `name` is passed
in is because of metaprogramming on loading the right builder. I
think that should eventually be refactored.
- Replaced and removed `update_repo3` and `update_repo4` in favor of
just `build_repo3` and `build_repo4`. Rather than tell someone writing
tests to use a different method, automatically use the right method.
https://github.com/ruby/rubygems/commit/68c39c8451
|
|
```
$ rake spec:regular
Successfully built RubyGem
Name: bundler
Version: 4.0.0.dev
File: bundler-4.0.0.dev.gem
```
https://github.com/ruby/rubygems/commit/8f0ca5eefa
|
|
This is a follow up to #9053. We can avoid shelling out for generating
the gem index.
https://github.com/ruby/rubygems/commit/e40bafe9f1
|
|
|
|
https://github.com/ruby/rubygems/commit/2142e405b0
|
|
I'm trying to speed up the bundler tests. The tests shell out a lot in
order to build gems. We can build gems without creating a sub-process.
This change reduced the test suite time from ~24 minutes, to about ~21
minutes on my machine. Once we have more of these "asset generation"
routines done in the same process, I think we can start caching the
outputs for further improvements
https://github.com/ruby/rubygems/commit/ebf27056c6
|
|
https://github.com/ruby/rubygems/commit/33c7a9a565
|
|
spec:deps task
https://github.com/rubygems/rubygems/commit/3189d3e49b
|
|
|
|
I plan to introduce a `base_system_gems` helper to actually install gems
from `base_system_gem_path` into system gems but that would collapse
with an existing helper.
https://github.com/rubygems/rubygems/commit/714c209e62
|
|
Let them run against the version resolved by the `test_gems.rb` gemfile.
This should fix ruby-core CI job that was broken by the release of rake
13.3.0.
|
|
x64-mingw-ucrt (platforms)
- the x64-mingw32 platform has been superseded by x64-mingw-ucrt
- the mingw-ucrt platform is present as of Windows 10, which was released 10 years ago in 2015 and all versions prior to 10 are end-of-life and 10 will be by mid October 2025
- newer rubies use the mingw-ucrt platform instead of the mingw32 platform, meaning using the deprecated platform can cause issues during gem installation
https://github.com/rubygems/rubygems/commit/b9d871022e
|
|
|
|
`make test-bundler-parallel` prints many errors, so try to
downgrade rake version.
```
219) bundle install --standalone run in a subdirectory with --binstubs creates stubs that can be symlinked
Failure/Error:
raise <<~ERROR
#{error_header}
----------------------------------------------------------------------
#{stdboth}
----------------------------------------------------------------------
ERROR
RuntimeError:
Commands:
$ /home/ko1/ruby/build/trunk/ruby -I/home/ko1/ruby/src/trunk/spec/bundler -r/home/ko1/ruby/src/trunk/spec/bundler/support/artifice/compact_index.rb -r/home/ko1/ruby/src/trunk/spec/bundler/support/hax.rb /home/ko1/ruby/src/trunk/tmp/2.13/gems/system/bin/bundle config set --local path /home/ko1/ruby/src/trunk/tmp/2.13/bundled_app/bundle
# $? => 0
Invoking `/home/ko1/ruby/build/trunk/ruby -I/home/ko1/ruby/src/trunk/spec/bundler -r/home/ko1/ruby/src/trunk/spec/bundler/support/artifice/compact_index.rb -r/home/ko1/ruby/src/trunk/spec/bundler/support/hax.rb /home/ko1/ruby/src/trunk/tmp/2.13/gems/system/bin/bundle install --standalone --binstubs` failed with output:
----------------------------------------------------------------------
[DEPRECATED] The --binstubs option will be removed in favor of `bundle binstubs --all`
Could not find compatible versions
Because every version of rails depends on rake = 13.3.0
and rake = 13.3.0 could not be found in rubygems repository https://gem.repo1/ or installed locally,
rails cannot be used.
So, because Gemfile depends on rails >= 0,
version solving has failed.
Fetching gem metadata from https://gem.repo1/...
Resolving dependencies...
----------------------------------------------------------------------
Shared Example Group: "bundle install --standalone" called from ./spec/bundler/install/gems/standalone_spec.rb:532
# /home/ko1/ruby/src/trunk/spec/bundler/support/command_execution.rb:26:in 'Spec::CommandExecution#raise_error!'
# /home/ko1/ruby/src/trunk/spec/bundler/support/subprocess.rb:66:in 'Spec::Subprocess#sh'
# /home/ko1/ruby/src/trunk/spec/bundler/support/helpers.rb:216:in 'Spec::Helpers#sys_exec'
# /home/ko1/ruby/src/trunk/spec/bundler/support/helpers.rb:107:in 'Spec::Helpers#bundle'
# /home/ko1/ruby/src/trunk/spec/bundler/install/gems/standalone_spec.rb:482:in 'block (3 levels) in <top (required)>'
# /home/ko1/ruby/src/trunk/spec/bundler/spec_helper.rb:107:in 'block (4 levels) in <top (required)>'
# /home/ko1/ruby/src/trunk/spec/bundler/spec_helper.rb:107:in 'block (3 levels) in <top (required)>'
# /home/ko1/ruby/src/trunk/spec/bundler/support/helpers.rb:355:in 'block in Spec::Helpers#with_gem_path_as'
# /home/ko1/ruby/src/trunk/spec/bundler/support/helpers.rb:369:in 'Spec::Helpers#without_env_side_effects'
# /home/ko1/ruby/src/trunk/spec/bundler/support/helpers.rb:350:in 'Spec::Helpers#with_gem_path_as'
# /home/ko1/ruby/src/trunk/spec/bundler/spec_helper.rb:106:in 'block (2 levels) in <top (required)>'
```
Notes:
Merged: https://github.com/ruby/ruby/pull/13483
|
|
|
|
Necessary changes to get tests passing are:
* Rewrite one "out of memory" error spec to not define a subclass inside
a RSpec context block. Due to some [JRuby issue], that's failing in
JRuby 10, so I rewrote the test so that the Bundler process really
goes OOM and that class definition is not necessary.
* JRuby 10, even if Ruby 3.4-compatible, has not yet adapted backtraces
to include receivers, so our tests need an special case for JRuby when
detecting a test method call inside backtraces.
* Warbler test is upgraded to use JRuby 10. Getting it to pass needs [a
PR] to warbler, so our test is temporarily pointing to that PR.
[JRuby issue]: https://github.com/jruby/jruby/issues/8838
[a PR]: https://github.com/jruby/warbler/pull/557
https://github.com/rubygems/rubygems/commit/edec85d4c3
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13083
|
|
This has the following benefits:
* Avoid duplicated work in some specs that first build a repo, and then
overwrite it with a completely different set of gems.
* Reduce RSpec nesting and improve readability.
* The change also made surfaces several specs that were incorrect since
they were unintentionally not testing the right thing.
https://github.com/rubygems/rubygems/commit/ed430883e0
|
|
This gets our daily Bundler CI back to green.
https://github.com/rubygems/rubygems/commit/1bb70f75d2
Notes:
Merged: https://github.com/ruby/ruby/pull/12890
|
|
https://github.com/rubygems/rubygems/commit/677e17aa2e
|
|
Unfortunately this requires reverting a previous enhancement of
reinstalling gems if they incorrectly ship with an empty installation
dir.
However, there's no way to distinguish this kind of bad state from a gem
that's empty for real, for example, sorbet-static-and-runtime.
This reverts commit https://github.com/rubygems/rubygems/commit/9720a9b980d2, and adds a
spec to make sure empty gems are not reinstalled every time.
https://github.com/rubygems/rubygems/commit/7c102394af
|
|
Real gems hardly ever do this, so don't do it ourselves for testing
either.
https://github.com/rubygems/rubygems/commit/2c8960cfb4
|
|
https://github.com/rubygems/rubygems/commit/96496e3f53
Co-authored-by: Johnny Shields <johnny.shields@gmail.com>
|
|
Spec::BuildMetadata is only called from BundlerBuilder.
The current code is broken to call Spec::Builders#build_* method directly.
https://github.com/rubygems/rubygems/commit/4922ae40dd
|
|
Only in CI, if two different test runs are started (like `bin/rake
spec:all` does), the second one would not install the dev version of
Bundler and would fail to start.
This commit makes it work the same locally and in CI.
https://github.com/rubygems/rubygems/commit/7a5ca6c40f
|
|
https://github.com/rubygems/rubygems/commit/8b6f9b7f05
|
|
https://github.com/rubygems/rubygems/commit/f40610b699
|
|
https://github.com/rubygems/rubygems/commit/7ba7073a35
|
|
https://github.com/rubygems/rubygems/commit/362c960497
|
|
https://github.com/rubygems/rubygems/commit/92dcf60fc1
|
|
https://github.com/rubygems/rubygems/commit/8f262f3a47
|
|
https://github.com/rubygems/rubygems/commit/d8cf4aa0cd
|
|
truffleruby to cruby
https://github.com/rubygems/rubygems/commit/4f3d9fa3bf
|
|
https://github.com/rubygems/rubygems/commit/0f2db73619
|
|
https://github.com/rubygems/rubygems/commit/83b417a166
|
|
Also limit caller ranges
https://github.com/rubygems/rubygems/commit/a274b1af78
|
|
https://github.com/rubygems/rubygems/commit/9f9493c77c
|
|
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
|
|
|
|
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
|
|
This gets in the middle if we ever start allowing to build as if using a
different RubyGems version than the one being run.
This could be useful to make `gem rebuild` a little more usable, and
it's already done by Bundler specs which already make this method a noop
when they need this.
I'm not sure forcefully setting this, even if user explicitly specified
something else is helpful.
Since this could potentially prevent gems explicitly setting a constant
RubyGems version from building, I changed the error of incorrect
RubyGems version from a hard error to a warning, since it will start
happening in those cases if we stop overwriting the version.
https://github.com/rubygems/rubygems/commit/45676af80d
|
|
|
|
|
|
https://github.com/rubygems/rubygems/commit/af806b8dff
|
|
|
|
Specs that use extension gems were failing in the new job but I noticed
that they were using very non standard `extconf.rb` files.
The hack being removed here was added just to make specs pass when run
in ruby-core but it seems the underlying issue has been fixed now, and
it's causing issues with Ruby 3.3 and Windows, so necessary so I'm
removing it and moving on.
https://github.com/rubygems/rubygems/commit/5b78275f0e
|
|
|
|
And make it easier to update next time.
https://github.com/rubygems/rubygems/commit/1ea4bfa5d8
|
|
rubygems-generate_index gem
So generate_index can be implemented with dependencies, such as the compact index
Took this approach from feedback in https://github.com/rubygems/rubygems/pull/6853
Running `gem generate_index` by default will use an installed rubygems-generate_index, or install and then use the command from the gem
Apply suggestions from code review
https://github.com/rubygems/rubygems/commit/fc1cb9bc9e
Co-authored-by: Hiroshi SHIBATA <hsbt@ruby-lang.org>
|