From 4ca19ab1720fd881e6cf68e22000c3da565290ba Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Thu, 18 Oct 2018 23:57:16 -0700 Subject: Upgrade to Ruby 2.4.5 --- .gitlab-ci.yml | 6 +++--- .ruby-version | 2 +- doc/install/installation.md | 6 +++--- doc/update/11.3-to-11.4.md | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ccc9e640970..ec8d812b0a4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: "dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.4.4-golang-1.9-git-2.18-chrome-69.0-node-8.x-yarn-1.2-postgresql-9.6-graphicsmagick-1.3.29" +image: "dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.4.5-golang-1.9-git-2.18-chrome-69.0-node-8.x-yarn-1.2-postgresql-9.6-graphicsmagick-1.3.29" .dedicated-runner: &dedicated-runner retry: 1 @@ -6,7 +6,7 @@ image: "dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.4.4-golang-1.9-git - gitlab-org .default-cache: &default-cache - key: "ruby-2.4.4-debian-stretch-with-yarn" + key: "ruby-2.4.5-debian-stretch-with-yarn" paths: - vendor/ruby - .yarn-cache/ @@ -594,7 +594,7 @@ static-analysis: script: - scripts/static-analysis cache: - key: "ruby-2.4.4-debian-stretch-with-yarn-and-rubocop" + key: "ruby-2.4.5-debian-stretch-with-yarn-and-rubocop" paths: - vendor/ruby - .yarn-cache/ diff --git a/.ruby-version b/.ruby-version index 79a614418f7..59aa62c1fa4 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.4.4 +2.4.5 diff --git a/doc/install/installation.md b/doc/install/installation.md index 1210ac58499..37c826ce9e0 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -132,9 +132,9 @@ Remove the old Ruby 1.8 if present: Download Ruby and compile it: mkdir /tmp/ruby && cd /tmp/ruby - curl --remote-name --progress https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.4.tar.gz - echo 'ec82b0d53bd0adad9b19e6b45e44d54e9ec3f10c ruby-2.4.4.tar.gz' | shasum -c - && tar xzf ruby-2.4.4.tar.gz - cd ruby-2.4.4 + curl --remote-name --progress https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.5.tar.gz + echo '4d650f302f1ec00256450b112bb023644b6ab6dd ruby-2.4.5.tar.gz' | shasum -c - && tar xzf ruby-2.4.5.tar.gz + cd ruby-2.4.5 ./configure --disable-install-rdoc make diff --git a/doc/update/11.3-to-11.4.md b/doc/update/11.3-to-11.4.md index b50e21f27dd..00dfb19b4b4 100644 --- a/doc/update/11.3-to-11.4.md +++ b/doc/update/11.3-to-11.4.md @@ -39,9 +39,9 @@ Download Ruby and compile it: ```bash mkdir /tmp/ruby && cd /tmp/ruby -curl --remote-name --progress https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.4.tar.gz -echo 'ec82b0d53bd0adad9b19e6b45e44d54e9ec3f10c ruby-2.4.4.tar.gz' | shasum -c - && tar xzf ruby-2.4.4.tar.gz -cd ruby-2.4.4 +curl --remote-name --progress https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.5.tar.gz +echo '4d650f302f1ec00256450b112bb023644b6ab6dd ruby-2.4.5.tar.gz' | shasum -c - && tar xzf ruby-2.4.5.tar.gz +cd ruby-2.4.5 ./configure --disable-install-rdoc make -- cgit v1.2.1 From 0cbefe85ed2823d2201fd9d30120ecf7535e88a0 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Tue, 23 Oct 2018 10:23:01 -0700 Subject: Add a monkey patch to squelch warnings from whitequark/parser --- config/initializers/parser_patch.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 config/initializers/parser_patch.rb diff --git a/config/initializers/parser_patch.rb b/config/initializers/parser_patch.rb new file mode 100644 index 00000000000..8ebd804b94f --- /dev/null +++ b/config/initializers/parser_patch.rb @@ -0,0 +1,15 @@ +# frozen_literal_string: true + +# This works around unnecessary static-analysis warnings that will be +# fixed via https://github.com/whitequark/parser/pull/528. +module Parser + class << self + def warn_syntax_deviation(feature, version) + return if ['2.3.8', '2.4.5', '2.5.3'].include?(version) + + warn "warning: parser/current is loading #{feature}, which recognizes" + warn "warning: #{version}-compliant syntax, but you are running #{RUBY_VERSION}." + warn "warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri." + end + end +end -- cgit v1.2.1 From 3a9271f17914858879221a141989bb04076c0b0c Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 24 Oct 2018 15:29:03 +0800 Subject: Convert parser warnings to stdout in haml_lint This was used in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/16648 and this could happen from time to time, so let's just keep it. --- config/initializers/parser_patch.rb | 15 --------------- lib/tasks/haml-lint.rake | 11 +++++++++++ 2 files changed, 11 insertions(+), 15 deletions(-) delete mode 100644 config/initializers/parser_patch.rb diff --git a/config/initializers/parser_patch.rb b/config/initializers/parser_patch.rb deleted file mode 100644 index 8ebd804b94f..00000000000 --- a/config/initializers/parser_patch.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_literal_string: true - -# This works around unnecessary static-analysis warnings that will be -# fixed via https://github.com/whitequark/parser/pull/528. -module Parser - class << self - def warn_syntax_deviation(feature, version) - return if ['2.3.8', '2.4.5', '2.5.3'].include?(version) - - warn "warning: parser/current is loading #{feature}, which recognizes" - warn "warning: #{version}-compliant syntax, but you are running #{RUBY_VERSION}." - warn "warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri." - end - end -end diff --git a/lib/tasks/haml-lint.rake b/lib/tasks/haml-lint.rake index ad2d034b0b4..786efd14b1a 100644 --- a/lib/tasks/haml-lint.rake +++ b/lib/tasks/haml-lint.rake @@ -2,5 +2,16 @@ unless Rails.env.production? require 'haml_lint/rake_task' require 'haml_lint/inline_javascript' + # Workaround for warnings from parser/current + # Keep it even if it no longer emits any warnings, + # because we'll still see warnings in console/server anyway, + # and we don't need to break static-analysis for this. + task :haml_lint do + require 'parser' + def Parser.warn(*args) + puts(*args) # static-analysis ignores stdout if status is 0 + end + end + HamlLint::RakeTask.new end -- cgit v1.2.1