Commit graph

64552 commits

Author SHA1 Message Date
Nobuyoshi Nakada
579645d9f8
Fixed infinite loop at error in printing cause [Bug #17033] 2020-07-15 21:39:20 +09:00
Nobuyoshi Nakada
79d06483a8
Close sockets if blocking to fix leaked fds 2020-07-15 16:36:57 +09:00
David Rodríguez
5783d0dbfc Import remaining changes
The "sync with commits" scripts failed to properly import these for some
reason.
2020-07-15 16:05:12 +09:00
David Rodríguez
0c8d90b526 [rubygems/rubygems] Unswallow Gem::Package::FormatError
This error happen in a CI run, and as it is currently, it doesn't give
any useful information about the underlying cause. Let's not swallow the
original error.

8c17ba2f45
2020-07-15 16:05:12 +09:00
David Rodríguez
1f7195421e [rubygems/rubygems] July man pages
58d9a3de5b
2020-07-15 16:05:12 +09:00
Utkarsh Gupta
fd709382b6 [rubygems/rubygems] Tag the specs with :readline
The newly added specs needs to be tagged as
:readline, otherwise they fail on Windows with
the backtrace: `ZeroDivisionError: divided by 0`.

Such issues are already being skipped on Windows.

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>

391f860af4
2020-07-15 16:05:12 +09:00
Utkarsh Gupta
c44c7019b5 [rubygems/rubygems] Add tests with different flag combinations
Since this PR was made because we missed checking
RuboCop offenses with different flags, therefore
adding tests so that all flag combinations are
tested.

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>

d08250efc2
2020-07-15 16:05:12 +09:00
David Rodríguez
4f9c673cab [rubygems/rubygems] Allow setting a tag prefix to be used by gem release tasks
679008f23a
2020-07-15 16:05:12 +09:00
Utkarsh Gupta
ca133c0366 [rubygems/rubygems] Fix line spacing to make Layout/EmptyLines happy
The Gemfile wasn't properly put in the last commit.
As a result, Layout/EmptyLines inspected an offense
in the Gemfile.

This also fixes the spec w.r.t change in the task
default.

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>

d1418fddd3
2020-07-15 16:05:12 +09:00
Utkarsh Gupta
95f90e3d2b [rubygems/rubygems] Add blank lines to make Bundler/OrderedGems happy
If the blank lines aren't used, then rubocop tries to
sort them in alphabetical order within their section.
Thus, adding lines so rubocop considers them as
different sections and doesn't try to sort them.

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>

cf44b18f0f
2020-07-15 16:05:12 +09:00
Utkarsh Gupta
281898ed6c [rubygems/rubygems] Fix Rakefile to make Style/SymbolArray happy
In case of multiple Rake tasks, the default tasks would
look something like this:
`task default: [:spec, :rubocop]`

Instead, they should use %i and look something like this:
`task default: %i[spec rubocop]`

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>

487ecd59ce
2020-07-15 16:05:12 +09:00
Utkarsh Gupta
8c65f612f4 [rubygems/rubygems] Fix remaining RuboCop issues
With #3731 and #3740 merged, this covers up the
remaining part of the issues.
This was discovered when one tries to create a gem
with a different framework.
Could be reproduced with:
`bundle gem foo --ext --test=test-unit`

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>

51b6457150
2020-07-15 16:05:12 +09:00
Jean Boussier
40f73b3a00 [rubygems/rubygems] Avoid calling LoadError#message because of its slowness
Instead we can rely on `LoadError#path`

16d5c3b43c
2020-07-15 16:05:12 +09:00
David Rodríguez
2fafc08aa3 [rubygems/rubygems] Remove unneeded trailing conditions on exitstatus
27e0e4ecb6
2020-07-15 16:05:12 +09:00
David Rodríguez
547ba6608e [rubygems/rubygems] Easier way to find path to ruby binary
cdc201f5c4
2020-07-15 16:05:12 +09:00
David Rodríguez
16823d4a05 [rubygems/rubygems] Remove unnecessary assertions on exitstatus
Since our helpers now raise by default if the subcommand fails, these
will never actually fail and are not necessary.

6153b9321e
2020-07-15 16:05:12 +09:00
Utkarsh Gupta
e2837a77be [rubygems/rubygems] Constrain (shipped) RuboCop's version
Right now, we're not specifying the version constraints
on RuboCop that is shipped when a new gem is created.
This can break specs which runs rubocop on a new
skeleton gem as the newer versions of RuboCop are
released.

This commit ensures that the specs don't break by
constraining the RuboCop version.

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>

0b47243edd
2020-07-15 16:05:12 +09:00
David Rodríguez
17b92d221f [rubygems/rubygems] No need to update remotes
Everything is already fetched locally.

9c304639b1
2020-07-15 16:05:12 +09:00
David Rodríguez
d189d31ce9 [rubygems/rubygems] Git clone already takes care of this
6e0c28d3ab
2020-07-15 16:05:12 +09:00
David Rodríguez
a73ea2126f [rubygems/rubygems] Clone rubygems from the local repo
It simplifies things and should avoid issues like the one we had where
the master branch had a bad `.gitattributes` file and changing it on a
PR would be disregarded.

In order for this to work, we need to make sure to fetch all tags from
the repository, so that they can properly be checked out later. This
does not apply to the case of testing against `RGV=..`, since no extra
cloning is needed there.

d088d936b8
2020-07-15 16:05:12 +09:00
Utkarsh Gupta
5ebca6d709 [rubygems/rubygems] Skip this spec on ruby_core workflow
ruby_core has an 'ast.rb' file that gets in the
middle and breaks this spec, so it's better we skip
this test on this workflow for now.

Also, slightly change the spec name from "run" to
"runs" and change the last assertion, it's cleaner
to check empty error.
Thanks to David Rodríguez for this!

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>

ba8eaa70c3
2020-07-15 16:05:12 +09:00
Utkarsh Gupta
d0810fdee4 [rubygems/rubygems] Use latest version of rubocop for RUBY_VERSION > 2.4
With older versions of rubocop, the dependency on
`jaro_winkler` seems to be a pain.
However, in the later versions of rubocop, this
dependency was dropped. So we only need to use
the older version for ruby2.3.

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>

9cd87eaee3
2020-07-15 16:05:12 +09:00
Utkarsh Gupta
077dcacb08 [rubygems/rubygems] Use --config .rubocop.yml instead
because rubocop configuration inheritance is
messed up and when using `--ignore-parent-exclusion`,
even though the exit status is 0, the example
still fails because of the configuration issue.

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>

3e20b2738c
2020-07-15 16:05:12 +09:00
Utkarsh Gupta
ecb87b55d8 [rubygems/rubygems] Lock rubocop version to 0.80.1
The later RuboCop versions don't work with ruby2.3
so we should lock the version to what works with
ruby2.3 as we haven't dropped the support yet.

And since we're using the older version of rubocop,
also fix `Max` value of `LineLength` to 120, which
is the current standard. Without this, rubocop
will throw the line length offenses.

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>

46d0a800a2
2020-07-15 16:05:12 +09:00
Utkarsh Gupta
215f7c3165 [rubygems/rubygems] Fix linting and make Style/RedundantInterpolation happy
Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>

83e330fa87
2020-07-15 16:05:12 +09:00
Utkarsh Gupta
4875a96edd [rubygems/rubygems] Fix test to run rubocop on the generated gem
With this, it will be ensured that the generated
(skeleton) gem will have no offenses.

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>

47411262e0
2020-07-15 16:05:12 +09:00
Utkarsh Gupta
b28c6d04d0 [rubygems/rubygems] Make Style/HashSyntax cop happy
Previously, we were using the old syntax like:
`task :default => :spec`, but now this commit
uses the new Ruby 1.9 hash syntax.

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>

b41d0fdb56
2020-07-15 16:05:12 +09:00
Utkarsh Gupta
449d24200b [rubygems/rubygems] WIP: add test to run rubocop on the generated gem
Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>

730b770f8a
2020-07-15 16:05:12 +09:00
Utkarsh Gupta
cbe4d29c2d [rubygems/rubygems] Roll back to Dir.chdir block
since without that, evaluating the gemspec from
outside `File.expand_path( __dir__)` won't work.

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>

9e5e52a1d9
2020-07-15 16:05:12 +09:00
Utkarsh Gupta
084489be87 [rubygems/rubygems] Fix tests pertaining to newgem
Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>

e2ee0b7de3
2020-07-15 16:05:12 +09:00
Utkarsh Gupta
3b0d2a3d6d [rubygems/rubygems] Fix RuboCop offenses
These offenses appear when you create a gem with
`bundle gem foo` and run `rubocop` over it.

Initially, there were around 45 offenses detected,
but with #3731 and this, the number of offenses
have been reduced to 2.

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>

fe9dcaa1b4
2020-07-15 16:05:12 +09:00
David Rodríguez
2b73f26fde [rubygems/rubygems] Show also output from all commands on rubygems checkout errors
1fe24e471d
2020-07-15 16:05:12 +09:00
David Rodríguez
5ae80c5207 [rubygems/rubygems] Remove --quiet flag to git checkout
Since we don't show this output by default, it's better to be verbose
in case we happen to need more info.

baa4ccf5a6
2020-07-15 16:05:12 +09:00
MSP-Greg
23cf99e99d [rubygems/rubygems] Bundler specs - Windows - remove skips, File.open => File.readlines
Using File.open without a block leaves a file reference that causes issues with file operations

commands/binstubs_spec.rb
install/gems/compact_index_spec.rb
install/gems/dependency_api_spec.rb
install/gems/standalone_spec.rb
runtime/executable_spec.rb

4b9a6ca156
2020-07-15 16:05:12 +09:00
MSP-Greg
ad743337b3 [rubygems/rubygems] bundler/spec/commands/binstubs_spec.rb - remove global Windows skip
Added one skip for:
bundle binstubs <gem>
when the gem exists in the lockfile
when generating bundle binstub outside bundler
should abort

b77b484889
2020-07-15 16:05:12 +09:00
MSP-Greg
f3ad8a00e2 [rubygems/rubygems] bundler/lib/bundler/installer.rb - fix Windows 'executable_stubs'
Windows normal shell requires binstubs with *.cmd extensions

b46326eb1f
2020-07-15 16:05:12 +09:00
Sora Morimoto
48ba9b6106 Update actions/cache from v1 to v2
Signed-off-by: Sora Morimoto <sora@morimoto.io>
2020-07-15 15:57:16 +09:00
Koichi Sasada
c25d249e63 RBasci::flags (VALUE) doesn't match int.
The type of RBasic::flags is VALUE, and INT2FIX(flags) does not
make sense. Use correct type to represent.
2020-07-15 13:36:38 +09:00
git
dfe88350df * 2020-07-15 [ci skip] 2020-07-15 11:22:10 +09:00
Koichi Sasada
fc220b129d rubygems is needed to run solo-file test 2020-07-15 11:21:33 +09:00
Koichi Sasada
c87ee8005b rubygems is needed to run solo-file test 2020-07-15 11:21:14 +09:00
卜部昌平
e60cd14d85 ON_DEBUG: delete unused macro
This is no longer used.
2020-07-14 13:19:55 +09:00
卜部昌平
8d3a084572 _mjit_compile_invokebuiltin: sp_inc can be negative
Was my bad to assume sp_inc was positive.  Real criteria is the
calculated sp is non-negative.  We have to assert that.
2020-07-14 13:15:06 +09:00
Jeremy Evans
8900a25581
Fix Range#{max,minmax} for range with integer beginning and non-integer end
Previously, for inclusive ranges, the max would show up as the
end of the range, even though the end was not an integer and would
not be the maximum value.  For exclusive ranges, max/minmax would
previously raise a TypeError, even though it is possible to get the
correct maximum.

This change to max/minmax also uncovered a similar error in cover?,
which calls max in certain cases, so adjust the code there so that
cover? still works as expected.

Fixes [Bug #17017]
2020-07-13 10:09:38 -07:00
git
a1bcfbe30c * 2020-07-14 [ci skip] 2020-07-14 02:07:08 +09:00
Takashi Kokubun
46d1777a43
Remove --jit-min-calls for now
--jit-min-calls=5 is too unstable
2020-07-13 10:06:34 -07:00
Nobuyoshi Nakada
c2a6295ec0
Make the mkmf methods private in the global [Bug #16896] 2020-07-13 18:44:22 +09:00
Takashi Kokubun
d99d96cc6d
Add --jit-min-calls=5 (#3313)
* RUN_OPTS needs to be specified for overriding it

* Add --jit-min-calls=5
2020-07-12 22:10:57 -07:00
卜部昌平
2e5a711f47 common.mk: add missing dependency 2020-07-13 12:45:26 +09:00
卜部昌平
927fe2422f mk_builtin_loader.rb: STACK_ADDR_FROM_TOP unusable
Stacks are emulated in MJIT, must not touch the original VM stack.

See also http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/3061353
2020-07-13 12:30:43 +09:00