Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC:Remove devtools from main gem set #2421

Closed
wants to merge 7 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 27 additions & 19 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ gemspec

# Development dependencies
gem 'addressable', '~> 2.4.0' # locking transitive dependency of webmock
gem 'appraisal', '~> 2.2'
gem 'benchmark-ips', '~> 2.8'
gem 'benchmark-memory', '< 0.2' # V0.2 only works with 2.5+
gem 'builder'
Expand All @@ -15,7 +14,6 @@ gem 'extlz4', '~> 0.3', '>= 0.3.3' if RUBY_PLATFORM != 'java' # Used to test lz4
gem 'json-schema', '< 3' # V3 only works with 2.5+
gem 'memory_profiler', '~> 0.9'
gem 'os', '~> 1.1'
gem 'pimpmychangelog', '>= 0.1.2'
gem 'pry'
if RUBY_PLATFORM != 'java'
# There's a few incompatibilities between pry/pry-byebug on older Rubies
Expand All @@ -28,7 +26,6 @@ else
end
gem 'rake', '>= 10.5'
gem 'rake-compiler', '~> 1.1', '>= 1.1.1' # To compile native extensions
gem 'redcarpet', '~> 3.4' if RUBY_PLATFORM != 'java'
gem 'rspec', '~> 3.12'
gem 'rspec-collection_matchers', '~> 1.1'
if RUBY_VERSION >= '2.3.0'
Expand All @@ -55,14 +52,6 @@ if RUBY_VERSION < '2.3.0'
gem 'rexml', '< 3.2.5' # Pinned due to https://github.com/ruby/rexml/issues/69
end
gem 'webrick', '>= 1.7.0' if RUBY_VERSION >= '3.0.0' # No longer bundled by default since Ruby 3.0
gem 'yard', '~> 0.9'

if RUBY_VERSION >= '2.4.0'
gem 'rubocop', ['~> 1.10', '< 1.33.0'], require: false
gem 'rubocop-packaging', '~> 0.5', require: false
gem 'rubocop-performance', '~> 1.9', require: false
gem 'rubocop-rspec', '~> 2.2', require: false
end

# Optional extensions
# TODO: Move this to Appraisals?
Expand All @@ -84,12 +73,31 @@ if RUBY_PLATFORM != 'java'
end
end

# For type checking
# Sorbet releases almost daily, with new checks introduced that can make a
# previously-passing codebase start failing. Thus, we need to lock to a specific
# version and bump it from time to time.
# Also, there's no support for windows
if RUBY_VERSION >= '2.4.0' && (RUBY_PLATFORM =~ /^x86_64-(darwin|linux)/)
gem 'sorbet', '= 0.5.9672'
gem 'spoom', '~> 1.1'
group :appraisal do
gem 'appraisal', '~> 2.2'
end
Copy link
Member Author

@marcotc marcotc Nov 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approach 1

Very specific groups, pretty much matching the tool name: e.g. appraisal, rubocop, yard, sorbet, etc.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be extremely granural, not too keen on that solution.


group :release do
gem 'pimpmychangelog', '>= 0.1.2' # Formats the CHANGELOG.md file
gem 'redcarpet', '~> 3.4' if RUBY_PLATFORM != 'java' # Used by YARD to generate docs
gem 'yard', '~> 0.9'
end
Copy link
Member Author

@marcotc marcotc Nov 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approach 2

Locally grouped gems, matching the high-level activity they are part of: e.g. release, static_check, benchmark, test, etc.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approach 2a

Locally grouped gems, but more granular then 2: e.g. changelog (has pimpmychangelog), docs (has redcarpet & yard), lint (has rubocop*), type_check (has sorbet & spoom) etc.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this better than Approach 1.

I like Approach 2 better than Approach 2a as I don't think we need to go that deep.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have strong thoughts either way, but I think coarser-grained groups seem like a good enough start, and we could always break them up as needed later.


group :static_check do
Copy link
Member

@lloeki lloeki Nov 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I usually call that just :check or :lint (not the least because the sorbet gem is not static: it evaluates files!)

if RUBY_VERSION >= '2.4.0'
gem 'rubocop', ['~> 1.10', '< 1.33.0'], require: false
gem 'rubocop-packaging', '~> 0.5', require: false
gem 'rubocop-performance', '~> 1.9', require: false
gem 'rubocop-rspec', '~> 2.2', require: false
end

# For type checking
# Sorbet releases almost daily, with new checks introduced that can make a
# previously-passing codebase start failing. Thus, we need to lock to a specific
# version and bump it from time to time.
# Also, there's no support for windows
if RUBY_VERSION >= '2.4.0' && (RUBY_PLATFORM =~ /^x86_64-(darwin|linux)/)
gem 'sorbet', '= 0.5.9672'
gem 'spoom', '~> 1.1'
end
end