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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creates a 1.34.0.1 version that is inoperable. #615

Merged
merged 1 commit into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
PATH
remote: .
specs:
standard (1.35.1)
standard (1.34.0.1)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.62.0)
rubocop (~> 1.60)
standard-custom (~> 1.0.0)
standard-performance (~> 1.3)

Expand All @@ -30,19 +30,19 @@ GEM
rake (13.0.6)
regexp_parser (2.8.2)
rexml (3.2.6)
rubocop (1.62.1)
rubocop (1.60.2)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.31.2)
parser (>= 3.3.0.4)
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
rubocop-performance (1.20.1)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
Expand Down
5 changes: 3 additions & 2 deletions lib/standard/cli.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require_relative "builds_config"
require_relative "loads_runner"
require_relative "prints_big_hairy_version_warning"

module Standard
class Cli
Expand All @@ -10,8 +11,8 @@ def initialize(argv)
end

def run
config = @builds_config.call(@argv)
@loads_runner.call(config.runner).call(config).to_i
PrintsBigHairyVersionWarning.new.call
exit 1
end
end
end
45 changes: 45 additions & 0 deletions lib/standard/prints_big_hairy_version_warning.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
module Standard
class PrintsBigHairyVersionWarning
WARNING = <<~MSG.gsub(/^ {6}/, "")
============================================================================
= WARNING: You do not want to run this version of Standard! =
============================================================================

What's going on here?
---------------------
Version 1.34.0 of Standard was set to depend on `~> 1.60' of RuboCop. This
constraint is too loose, and covers all minor versions of RuboCop 1.x.

"How do I fix this?", you might be asking.

How to fix this
---------------
If you add a version specifier pinning `standard' to a version newer
than 1.35.1, Bundler will resolve appropriate versions of `standard',
`rubocop', and any other rubocop-dependent gems you may have installed.

1. Update your Gemfile to pin standard to be at least one such version:

gem "standard", ">= 1.35.1"

2. Run `bundle`, which will install and lock more appropriate versions

Example output:
Using rubocop 1.48.1 (was 1.49.0)
Using standard 1.26.0 (was 0.0.36)

This version (1.34.0.1) is an inoperative placeholder gem that exists
solely to print this message.

We're very sorry for this inconvenience!

============================================================================
= END OF BIG SCARY WARNING =
============================================================================
MSG

def call
warn WARNING
end
end
end
2 changes: 1 addition & 1 deletion lib/standard/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Standard
VERSION = Gem::Version.new("1.35.1")
VERSION = Gem::Version.new("1.34.0.1")
end
5 changes: 4 additions & 1 deletion standard.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
lib = File.expand_path("../lib", __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "standard/version"
require "standard/prints_big_hairy_version_warning"

Gem::Specification.new do |spec|
spec.name = "standard"
Expand All @@ -23,12 +24,14 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]
spec.metadata["rubygems_mfa_required"] = "true"

spec.add_dependency "rubocop", "~> 1.62.0"
spec.add_dependency "rubocop", "~> 1.60"

spec.add_dependency "lint_roller", "~> 1.0"
spec.add_dependency "standard-custom", "~> 1.0.0"
spec.add_dependency "standard-performance", "~> 1.3"

spec.post_install_message = Standard::PrintsBigHairyVersionWarning::WARNING

# not semver: first three are lsp protocol version, last is patch
spec.add_dependency "language_server-protocol", "~> 3.17.0.2"
end