Daniel Niknam
34e073c0ca
[rubygems/rubygems] Reword the message
...
For errors that could happened while loading `rubygems/defaults/operating_system`
https://github.com/rubygems/rubygems/commit/6e1e2141f8
2021-08-31 19:06:14 +09:00
David Rodríguez
7d859489e1
[rubygems/rubygems] Bring --jobs
documentation up to date
...
https://github.com/rubygems/rubygems/commit/58da501e5d
2021-08-31 19:06:14 +09:00
David Rodríguez
890b261154
[rubygems/rubygems] See if parallel installation on Windows works better now
...
https://github.com/rubygems/rubygems/commit/0822e1c260
2021-08-31 19:06:14 +09:00
Daniel Niknam
744e128ed9
[rubygems/rubygems] Exclude truffleruby from the test for failure of operating_system.rb
...
truffleruby does not raise any error when requiring `rubygems`.
https://github.com/rubygems/rubygems/commit/21e2fcd0b2
2021-08-31 19:06:14 +09:00
Daniel Niknam
aafc615b4a
[rubygems/rubygems] Enhance error handling when loading the rubygems/defaults/operating_system file
...
When loading `rubygems/defaults/operating_system`
- we want to keep it silent if the raised exception is a LoadError
- we want to print a message in other cases and ask users to report the issue to their OS support.
Ruby 3 comes with special error handling for loading `rubygems` and it will show a warning when LoadError exception raised for requiring 'rubygem'.
Because of that, we decided to leave the LoadError scenario as it is.
Reference: d1998d8767/gem_prelude.rb (L1-L5)
https://github.com/rubygems/rubygems/commit/0a97e12fe1
2021-08-31 19:06:14 +09:00
David Rodríguez
9fa5c4cd07
[rubygems/rubygems] Also load user installed rubygems plugins
...
https://github.com/rubygems/rubygems/commit/82960c262f
2021-08-31 19:06:14 +09:00
David Rodríguez
21db5876ca
[rubygems/rubygems] Respect BUNDLE_USER_HOME
for global config location
...
https://github.com/rubygems/rubygems/commit/58fc31442f
2021-08-31 19:06:14 +09:00
David Rodríguez
ea16a0df80
[rubygems/rubygems] Disable RUBYGEMS_GEMDEPS
for bundler spec run
...
Running `bundler` specs using `bundler` is not supported.
https://github.com/rubygems/rubygems/commit/cc97b6773d
2021-08-31 19:06:14 +09:00
David Rodríguez
5aee962fe3
[rubygems/rubygems] Remove RUBYGEMS_GEMDEPS
warning
...
When setting the `RUBYGEMS_GEMDEPS` environment variable to allow
skipping `bundle exec`, `bundler` will print a warning about potential
incompatibility.
Initially the `RUBYGEMS_GEMDEPS` variable used a completely different
(re)implementation of `bundler` functionality. That implementation was
not battle tested and could potentially differ in behaviour from what
`bundler` does. That's why print a warning.
However, these days, all `rubygems` does when `RUBYGEMS_GEMDEPS` is set
is to require `bundler/setup`, so there's no risk of any
incompatibility, since that's just plain `bundler`.
https://github.com/rubygems/rubygems/commit/bbddc27016
2021-08-31 19:06:14 +09:00
David Rodríguez
ab1edc75f8
[rubygems/rubygems] Expect the right permissions on Windows
...
Given Windows doesn't have executable bit.
https://github.com/rubygems/rubygems/commit/35dc3fa845
2021-08-31 19:06:14 +09:00
David Rodríguez
2d0d1c339a
[rubygems/rubygems] Recommend bundle install
rather than gem install -g
...
https://github.com/rubygems/rubygems/commit/4028cbc408
2021-08-31 19:06:14 +09:00
David Rodríguez
76b77d9275
[rubygems/rubygems] Refactor reseting RUBYGEMS_GEMDEPS
in tests
...
https://github.com/rubygems/rubygems/commit/91dca11112
2021-08-31 19:06:14 +09:00
David Rodríguez
43aecf216e
[rubygems/rubygems] Get a CI matrix configured in default Github Actions generated config
...
Even if it only has one entry at the moment, it makes it easier to add
new entries by doing it this way.
https://github.com/rubygems/rubygems/commit/46232fe265
Co-authored-by: NeimadTL <damientalbot26@gmail.com>
2021-08-31 19:06:14 +09:00
David Rodríguez
2e30d9ab42
[rubygems/rubygems] Avoid double CI runs in default Github Actions generated config
...
Otherwise CI will run once for every pull request update and once for
every push.
The disavantage is that people working on a non default branch without
creating pull requests won't get CI run at all.
I think the advantages are greater than the disadvantages, it's also my
personal workflow, and it's something desired enough so that someone
opened an issue about it.
So let's do it!
https://github.com/rubygems/rubygems/commit/924d916a73
Co-authored-by: NeimadTL <damientalbot26@gmail.com>
2021-08-31 19:06:14 +09:00
David Rodríguez
553ee573d4
[rubygems/rubygems] Don't use gemdeps on bundler binstub
...
https://github.com/rubygems/rubygems/commit/320fdc1513
2021-08-31 19:06:14 +09:00
David Rodríguez
1663dd5f73
[rubygems/rubygems] Simplify rescue of bundler errors
...
As far as I understand, this block should only be run when
`bundler/setup` fails. The only other case where these errors could be
run is when bundler itself is required.
If bundler itself fails to be required or activated (like in old rubies
where it was not a default gem, for example), the raw error is much more
helpful than this message.
So we can move the rescue after bundler is succesfully required, and
that simplifies the list of exceptions that we need to track to just
`Bundler::Error`.
https://github.com/rubygems/rubygems/commit/3663c11e93
2021-08-31 19:06:14 +09:00
David Rodríguez
0aa9eb9eed
[rubygems/rubygems] Move list of exceptions to the rescue
clause
...
Instead of having to match classes and re-raise in the exception body.
https://github.com/rubygems/rubygems/commit/5edf74b781
2021-08-31 19:06:14 +09:00
David Rodríguez
87dfb55c16
[rubygems/rubygems] Use Gem.use_gemdeps
only from binstubs
...
The previous behavior was to automatically require `bundler/setup`
everytime `rubygems` was required, which I think was too much.
https://github.com/rubygems/rubygems/commit/b25379a295
2021-08-31 19:06:14 +09:00
David Rodríguez
a3b3fdc3cd
[rubygems/rubygems] Take advantage of target
being a Pathname
...
https://github.com/rubygems/rubygems/commit/c31b8cd232
2021-08-31 19:06:14 +09:00
David Rodríguez
8adc606271
[rubygems/rubygems] Fix git repo initialization on a path with spaces
...
https://github.com/rubygems/rubygems/commit/a2d6e10192
2021-08-31 19:06:14 +09:00
David Rodríguez
b6c082fd09
[rubygems/rubygems] Remove misleading comment
...
When I read, I thought the assertion was incorrect. It's doing the right
thing, though.
https://github.com/rubygems/rubygems/commit/e72c27367a
2021-08-31 19:06:14 +09:00
David Rodríguez
d9ecc97f33
[rubygems/rubygems] Remove bad TODO
...
The commented out code causes failing tests because it's not correct.
https://github.com/rubygems/rubygems/commit/38f0eca91a
2021-08-31 19:06:14 +09:00
David Rodríguez
19d77a1cfc
[rubygems/rubygems] Remove unnecessary spec manipulation
...
https://github.com/rubygems/rubygems/commit/c7c00c280f
2021-08-31 19:06:14 +09:00
David Rodríguez
199083dd15
[rubygems/rubygems] Simplify overkill usage of shared examples
...
https://github.com/rubygems/rubygems/commit/36a00144b9
2021-08-31 19:06:14 +09:00
David Rodríguez
10dcd0eb5b
[rubygems/rubygems] Deprecate bundle exec --no-keep-file-descriptors
...
https://github.com/rubygems/rubygems/commit/591466d512
2021-08-31 19:06:14 +09:00
David Rodríguez
8c1b31f7b3
[rubygems/rubygems] Don't warn default behaviour
...
https://github.com/rubygems/rubygems/commit/ed845d861c
2021-08-31 19:06:14 +09:00
David Rodríguez
58635d4ff7
[rubygems/rubygems] Keep file descriptors by default
...
https://github.com/rubygems/rubygems/commit/88b7a3e7e2
2021-08-31 19:06:14 +09:00
Nobuyoshi Nakada
9fc16a31d9
[rubygems/rubygems] Exclude gemspec file itself from gem
...
The processed YML data is included as metadata, the source gemspec
file is unused and just confusing.
https://github.com/rubygems/rubygems/commit/f444478eac
2021-08-31 19:06:14 +09:00
Tim Sutton
d7c734a27e
[rubygems/rubygems] typos in UI messages: fix a couple missing spaces between sentence breaks
...
https://github.com/rubygems/rubygems/commit/5cdda53382
2021-08-31 19:06:14 +09:00
David Rodríguez
97de4c02ad
[rubygems/rubygems] Remove now unnecessary code
...
https://github.com/rubygems/rubygems/commit/d74830d00b
2021-08-31 19:06:14 +09:00
David Rodríguez
0e01ad881a
[rubygems/rubygems] The --local
flag to bundle install
shouldn't hit the network
...
If the cache was missing, `bundler` would try to re-fetch it. With the
`--local` flag, it should just look at installed gems.
https://github.com/rubygems/rubygems/commit/630d29c69e
2021-08-31 19:06:14 +09:00
David Rodríguez
7116ec6199
[rubygems/rubygems] Requiring bundler/setup
shouldn't try to hit the network
...
https://github.com/rubygems/rubygems/commit/06f5efce02
2021-08-31 19:06:14 +09:00
David Rodríguez
0b4dbe2e6a
[rubygems/rubygems] Improve "gem not found in source" errors
...
When printing sources inside these error messages, it's useful to only
consider the current state of the source. For example, when requiring
`bundler/setup`, the source shouldn't be configured to be able to hit
the network, so the error message should only mention "locally installed
gems" to make that more clear.
https://github.com/rubygems/rubygems/commit/30eb14f853
2021-08-31 19:06:14 +09:00
David Rodríguez
2e850e0038
[rubygems/rubygems] Only set local variable in the branch using it
...
https://github.com/rubygems/rubygems/commit/9fd39bd5a3
2021-08-31 19:06:14 +09:00
David Rodríguez
b351cebab2
[rubygems/rubygems] Simplify error message building in resolver
...
Since all requirements have an explicit source now (even if it's the
default source).
https://github.com/rubygems/rubygems/commit/2c341cfc22
2021-08-31 19:06:14 +09:00
David Rodríguez
b17cdad2f8
[rubygems/rubygems] Remove redundant part of error message
...
It doesn't really add much, in my opinion. We want to be helpful, but
also concise when possible.
https://github.com/rubygems/rubygems/commit/9d56009cf7
2021-08-31 19:06:14 +09:00
David Rodríguez
f1c0729128
[rubygems/rubygems] Fix standalone generated script to deal with path sources
...
In the case of path sources, the path the source is pointing to should
be added directly to the `$LOAD_PATH` without any modifications.
https://github.com/rubygems/rubygems/commit/d3bba936f0
Co-authored-by: Daniel Niknam <mhmd.niknam@gmail.com>
2021-08-31 19:06:14 +09:00
David Rodríguez
7465b94f8a
[rubygems/rubygems] Remove unnecessary ruby_version
local variable
...
Under some case, this variable might not end up being used, in which
case running the script would print unused variable warnings.
https://github.com/rubygems/rubygems/commit/bf96030362
2021-08-31 19:06:14 +09:00
David Rodríguez
7566c85cc0
[rubygems/rubygems] Use same criteria for ruby engine as in the final script
...
https://github.com/rubygems/rubygems/commit/fcb8c3d188
2021-08-31 19:06:14 +09:00
David Rodríguez
3aa087d533
[rubygems/rubygems] Remove unnecessary ruby_engine
local variable
...
Under some case, this variable might not end up being used, in which
case running the script would print unused variable warnings.
https://github.com/rubygems/rubygems/commit/a2d6392ada
2021-08-31 19:06:14 +09:00
David Rodríguez
1d6551a02d
[rubygems/rubygems] Remove unnecessary path
local variable
...
We can use `__dir__` directly.
https://github.com/rubygems/rubygems/commit/0e6083ca94
2021-08-31 19:06:14 +09:00
David Rodríguez
97c0d3fead
[rubygems/rubygems] Fix unnecessary $LOAD_PATH modification in standalone script
...
Due to the `bundler` gem itself being ignored from `$LOAD_PATHS`, a
`nil` value is being introduced here, resulting in the current folder
being added to the `$LOAD_PATH` by the standalone script.
I'm pretty sure this is unintentional.
https://github.com/rubygems/rubygems/commit/df54b07b5e
2021-08-31 19:06:14 +09:00
David Rodríguez
23c27d2c7b
[rubygems/rubygems] Don't sort materialized specs when not necessary
...
This should fix a weird flaky spec failure, given that the code
producing the error will be no longer run.
https://github.com/rubygems/rubygems/commit/a171965409
2021-08-31 19:06:14 +09:00
David Rodríguez
0ab160e2e0
[rubygems/rubygems] Respect BUNDLE_USER_CONFIG
if set
...
https://github.com/rubygems/rubygems/commit/f28ab141af
2021-08-31 19:06:14 +09:00
David Rodríguez
d37c2441cc
[rubygems/rubygems] We can now avoid source materialization work
...
No need to fill up missing names from sources anymore since they should
now be properly set up correctly from the beginning.
https://github.com/rubygems/rubygems/commit/706fd28681
2021-08-31 19:06:14 +09:00
David Rodríguez
1b9b41472f
[rubygems/rubygems] Completely avoid replacing sources when in multisource compatibility mode
...
Since this mode is only enabled in frozen mode, it's fine to use the
lockfile and means we don't have to "prepare" the replacement for
materialization.
https://github.com/rubygems/rubygems/commit/dda01b288e
2021-08-31 19:06:14 +09:00
David Rodríguez
c2f376bcc0
[rubygems/rubygems] Fix standalone install of default gems
...
Rubygems source replacement was broken.
https://github.com/rubygems/rubygems/commit/3549c122f6
2021-08-31 19:06:14 +09:00
David Rodríguez
9e7249da4e
[rubygems/rubygems] This spec can pass now on ruby 3
...
TSort was released as a library so we can install it, and also other
gems that are loaded by the spec. Also, Ruby on Windows apparently loads
fiddle 1.0.6, so we need to also install that to make that not fail.
https://github.com/rubygems/rubygems/commit/2b8dcab99e
2021-08-31 19:06:14 +09:00
David Rodríguez
579dbe6ecb
[rubygems/rubygems] Remove unnecessary test repository
...
These gems are built and installed to system directly as default gems.
There's no need to also build a remote repo.
https://github.com/rubygems/rubygems/commit/ad9dad4c22
2021-08-31 19:06:14 +09:00
David Rodríguez
570167eaa9
[rubygems/rubygems] Give a bundle install
hint when bundle list
fails
...
https://github.com/rubygems/rubygems/commit/98f5087e34
2021-08-31 19:06:14 +09:00