Skip to content
Permalink
Browse files

Change to parser 2.7 series

  • Loading branch information
mbj committed Feb 2, 2020
1 parent 10572a1 commit 533f5ed51a6f4c30ab53fd0e4d0eaced6181bdb9
@@ -1,3 +1,8 @@
# v0.9.5 2020-02-02

* Change to 2.7 parser series.
This does not drop support for < 2.7 but enables to in the future add full Ruby 2.7 support.

# v0.9.4 2020-01-03

* Bump unparser dependency
@@ -6,12 +6,6 @@ gemspec name: 'mutant'

eval_gemfile File.expand_path('Gemfile.shared', __dir__)

gem(
'devtools',
git: 'https://github.com/mbj/devtools.git',
ref: '26ba0a1053e6cf7b79fc72d513a73457f9a38ead'
)

# Mutant itself uses an opensource license key.
# Scoped to https://github.com/mbj/mutant it'll
# not be useful elsewhere.
@@ -1,26 +1,3 @@
GIT
remote: https://github.com/mbj/devtools.git
revision: 26ba0a1053e6cf7b79fc72d513a73457f9a38ead
ref: 26ba0a1053e6cf7b79fc72d513a73457f9a38ead
specs:
devtools (0.1.23)
abstract_type (~> 0.0.7)
adamantium (~> 0.2.0)
anima (~> 0.3.0)
concord (~> 0.1.5)
flay (~> 2.12.0)
flog (~> 4.6.2)
procto (~> 0.0.3)
rake (~> 12.3.0)
reek (~> 5.3.0)
rspec (~> 3.8.0)
rspec-core (~> 3.8.0)
rspec-its (~> 1.2.0)
rubocop (~> 0.61.1)
simplecov (~> 0.16.1)
yard (~> 0.9.16)
yardstick (~> 0.9.9)

PATH
remote: .
specs:
@@ -35,7 +12,7 @@ PATH
ice_nine (~> 0.11.1)
memoizable (~> 0.4.2)
mprelude (~> 0.1.0)
parser (~> 2.6.5)
parser (~> 2.7.0.2)
procto (~> 0.0.2)
unparser (~> 0.4.6)

@@ -65,6 +42,23 @@ GEM
equalizer (~> 0.0.9)
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
devtools (0.1.25)
abstract_type (~> 0.0.7)
adamantium (~> 0.2.0)
anima (~> 0.3.0)
concord (~> 0.1.5)
flay (~> 2.12.0)
flog (~> 4.6.2)
procto (~> 0.0.3)
rake (~> 12.3.0)
reek (~> 5.6.0)
rspec (~> 3.8.0)
rspec-core (~> 3.8.0)
rspec-its (~> 1.2.0)
rubocop (~> 0.79.0)
simplecov (~> 0.16.1)
yard (~> 0.9.16)
yardstick (~> 0.9.9)
diff-lcs (1.3)
docile (1.3.2)
equalizer (0.0.11)
@@ -93,18 +87,17 @@ GEM
procto (~> 0.0.2)
mutant-license (0.1.0)
parallel (1.19.1)
parser (2.6.5.0)
parser (2.7.0.2)
ast (~> 2.4.0)
path_expander (1.1.0)
powerpack (0.1.2)
procto (0.0.3)
psych (3.1.0)
rainbow (3.0.0)
rake (12.3.3)
reek (5.3.2)
reek (5.6.0)
codeclimate-engine-rb (~> 0.4.0)
kwalify (~> 0.7.0)
parser (>= 2.5.0.0, < 2.7, != 2.5.1.1)
parser (>= 2.5.0.0, < 2.8, != 2.5.1.1)
psych (~> 3.1.0)
rainbow (>= 2.0, < 4.0)
rspec (3.8.0)
@@ -123,14 +116,13 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-support (3.8.3)
rubocop (0.61.1)
rubocop (0.79.0)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.5, != 2.5.1.1)
powerpack (~> 0.1)
parser (>= 2.7.0.1)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.4.0)
unicode-display_width (>= 1.4.0, < 1.7)
ruby-progressbar (1.10.1)
ruby_parser (3.14.1)
sexp_processor (~> 4.9)
@@ -141,7 +133,7 @@ GEM
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
thread_safe (0.3.6)
unicode-display_width (1.4.1)
unicode-display_width (1.6.1)
unparser (0.4.7)
abstract_type (~> 0.0.7)
adamantium (~> 0.2.0)
@@ -155,15 +147,15 @@ GEM
coercible (~> 1.0)
descendants_tracker (~> 0.0, >= 0.0.3)
equalizer (~> 0.0, >= 0.0.9)
yard (0.9.22)
yard (0.9.24)
yardstick (0.9.9)
yard (~> 0.8, >= 0.8.7.2)

PLATFORMS
ruby

DEPENDENCIES
devtools!
devtools (~> 0.1.25)
mutant!
mutant-license!
parallel (~> 1.3)
@@ -29,6 +29,15 @@ On each detection of uncovered semantics you have the opportunity to:
to test only the code you had been touching. See the [incremental](#only-mutating-changed-code)
mutation testing documentation.

## Ruby Versions

Mutant currently only works on cRuby/MRI. Starting with version 2.5.x. It supports all syntax features upto and
including Ruby 2.6.

Support for 2.7 syntax features is pending, see unparser issue: https://github.com/mbj/unparser/issues/129.

Mutant will work under Ruby 2.7 just fine, unless a 2.7 syntax feature is used. This will be resolved shortly.

## Licensing

Mutant was recently transitioned commercial software, with a free usage plan for opensource projects.
@@ -99,7 +99,7 @@ ClassCheck:
EnforcedStyle: kind_of?

# Do not prefer double quotes to be used when %q or %Q is more appropriate
UnneededPercentQ:
Style/RedundantPercentQ:
Enabled: false

# Allow a maximum ABC score
@@ -145,7 +145,7 @@ Alias:
EnforcedStyle: prefer_alias_method

# Do not waste my horizontal or vertical space
IndentArray:
Layout/FirstArrayElementIndentation:
Enabled: false

# Prefer
@@ -167,7 +167,7 @@ MultilineMethodCallIndentation:
Send:
Enabled: true

Layout/AlignHash:
Layout/HashAlignment:
EnforcedColonStyle: table
EnforcedHashRocketStyle: table
Layout/EmptyLineAfterGuardClause:
@@ -196,3 +196,10 @@ Style/RescueStandardError:
Enabled: false
Style/StderrPuts:
Enabled: false
# suggesting single letter variablesl bah
Naming/RescuedExceptionsVariableName:
Enabled: false
# false positive on private keywords
Layout/IndentationWidth:
Enabled: false

@@ -105,7 +105,7 @@ def parse_match_expressions(expressions)
#
# @return [undefined]
#
# rubocop:disable MethodLength
# rubocop:disable Metrics/MethodLength
def add_environment_options(opts)
opts.separator('Environment:')
opts.on('--zombie', 'Run mutant zombified') do
@@ -79,7 +79,7 @@ def setup
#
# @return [Result::Test]
#
# rubocop:disable MethodLength
# rubocop:disable Metrics/MethodLength
#
# ignore :reek:TooManyStatements
def call(tests)
@@ -55,7 +55,7 @@ def setup
#
# @return [Result::Test]
#
# rubocop:disable MethodLength
# rubocop:disable Metrics/MethodLength
def call(tests)
examples = tests.map(&all_tests_index.method(:fetch))
filter_examples(&examples.method(:include?))
@@ -10,14 +10,12 @@ module Meta
# Mutation example
class Example

# rubocop:disable MutableConstant
# rubocop:disable Style/MutableConstant
ALL = []

# Add example
#
# @return [undefined]
#
# rubocop:disable Performance/Caller
def self.add(*types, &block)
file = caller.first.split(':in', 2).first
ALL << DSL.call(file, Set.new(types), block)
@@ -61,7 +61,7 @@ def missing
def invalid_syntax
mutations.reject do |mutation|
::Parser::CurrentRuby.parse(mutation.source)
rescue ::Parser::SyntaxError # rubocop:disable Lint/HandleExceptions
rescue ::Parser::SyntaxError # rubocop:disable Lint/SuppressedException
end
end
memoize :invalid_syntax
@@ -12,28 +12,43 @@ class Generic < self
__LINE__
alias
arg_expr
array_pattern
array_pattern_with_tail
back_ref
blockarg
blockarg_expr
case_match
complex
const_pattern
eflipflop
empty
ensure
for
forward_args
forwarded_args
hash_pattern
ident
if_guard
iflipflop
in_match
in_pattern
kwnilarg
kwrestarg
kwsplat
match_alt
match_as
match_nil_pattern
match_rest
match_var
match_with_lvasgn
meth_ref
match_with_trailing_comma
module
numargs
numblock
numparam
objc_kwarg
objc_restarg
objc_varargs
pin
postexe
preexe
rational
@@ -45,6 +60,7 @@ class Generic < self
sclass
shadowarg
undef
unless_guard
until_post
while_post
xstr
@@ -5,7 +5,7 @@ class Mutator
class Node

# Namespace for send mutators
# rubocop:disable ClassLength
# rubocop:disable Metrics/ClassLength
class Send < self
include AST::Types

@@ -5,7 +5,7 @@ class Reporter
class CLI
# CLI output format
#
# rubocop:disable FormatString
# rubocop:disable Style/FormatString
class Format
include AbstractType, Concord.new(:tty)

@@ -17,7 +17,9 @@ class Zombifier

include AST::Sexp

# rubocop:disable Lint/InheritException
LoadError = Class.new(::LoadError)
# rubocop:enable Lint/InheritException

# Initialize object
#
@@ -31,10 +31,10 @@ Gem::Specification.new do |gem|
gem.add_runtime_dependency('ice_nine', '~> 0.11.1')
gem.add_runtime_dependency('memoizable', '~> 0.4.2')
gem.add_runtime_dependency('mprelude', '~> 0.1.0')
gem.add_runtime_dependency('parser', '~> 2.6.5')
gem.add_runtime_dependency('parser', '~> 2.7.0.2')
gem.add_runtime_dependency('procto', '~> 0.0.2')
gem.add_runtime_dependency('unparser', '~> 0.4.6')

gem.add_development_dependency('devtools', '~> 0.1.23')
gem.add_development_dependency('devtools', '~> 0.1.25')
gem.add_development_dependency('parallel', '~> 1.3')
end
@@ -10,7 +10,7 @@ module MutantSpec

# Namespace module for corpus testing
#
# rubocop:disable MethodLength
# rubocop:disable Metrics/MethodLength
module Corpus
TMP = ROOT.join('tmp').freeze
EXCLUDE_GLOB_FORMAT = '{%s}'
@@ -22,7 +22,7 @@ module Corpus
private_constant(*constants(false))

# Project under corpus test
# rubocop:disable ClassLength
# rubocop:disable Metrics/ClassLength
class Project
MUTEX = Mutex.new

@@ -259,7 +259,7 @@ def finish(path, _index, count)
#
# @param [Array<String>] arguments
#
# rubocop:disable GuardClause - guard clause without else does not make sense
# rubocop:disable Style/GuardClause - guard clause without else does not make sense
def system(arguments)
return if Kernel.system(*arguments)

@@ -26,8 +26,7 @@ def initialize(attributes)
super(DEFAULTS.merge(attributes))
end

# rubocop:disable Naming/UncommunicativeMethodParamName
def handle(vm, observation)
def handle(vm, observation) # rubocop:disable Naming/MethodParameterName
unless match?(observation)
fail "Unexpected event observation: #{observation.inspect}, expected #{inspect}"
end

0 comments on commit 533f5ed

Please sign in to comment.
You can’t perform that action at this time.