From ff26e09b8e6c2f915265f13a90c29095659be5ea Mon Sep 17 00:00:00 2001 From: Nicholas Chammas Date: Wed, 10 Jan 2024 13:38:34 -0500 Subject: [PATCH 1/4] loosen ruby dep spec --- docs/Gemfile | 12 ++++++++---- docs/Gemfile.lock | 13 ++++++------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/docs/Gemfile b/docs/Gemfile index fe2b1a8259b94..8177425cfb681 100644 --- a/docs/Gemfile +++ b/docs/Gemfile @@ -21,8 +21,12 @@ source "https://rubygems.org" # to pin versions in the lock file. # To update the lock file, run `bundle update`. # Version constraint reference: https://guides.rubygems.org/patterns/#declaring-dependencies -gem "ffi", "1.15.5" + gem "jekyll", "~> 4.3" -gem "rouge", "3.26.0" -gem "jekyll-redirect-from", "0.16.0" -gem "webrick", "1.8.1" +gem "jekyll-redirect-from", "~> 0.16" +# Rouge 4.0 drops support for Ruby < 2.7, which is EOL. +# See: https://github.com/rouge-ruby/rouge/blob/61bdda18f204a661413daa93d9624bc65ad219a5/CHANGELOG.md#version-400-2022-09-04 +gem "rouge", "~> 3.26" +# This resolves a build issue on Apple Silicon. +# See: https://issues.apache.org/jira/browse/SPARK-38488 +gem "ffi", "~> 1.15" diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index 1af211ae1df64..242fef08f71ef 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -9,9 +9,9 @@ GEM eventmachine (>= 0.12.9) http_parser.rb (~> 0) eventmachine (1.2.7) - ffi (1.15.5) + ffi (1.16.3) forwardable-extended (2.6.0) - google-protobuf (3.25.1) + google-protobuf (3.25.2) http_parser.rb (0.8.0) i18n (1.14.1) concurrent-ruby (~> 1.0) @@ -54,7 +54,7 @@ GEM rb-inotify (0.10.1) ffi (~> 1.0) rexml (3.2.6) - rouge (3.26.0) + rouge (3.30.0) safe_yaml (1.0.5) sass-embedded (1.69.7) google-protobuf (~> 3.25) @@ -68,11 +68,10 @@ PLATFORMS ruby DEPENDENCIES - ffi (= 1.15.5) + ffi (~> 1.15) jekyll (~> 4.3) - jekyll-redirect-from (= 0.16.0) - rouge (= 3.26.0) - webrick (= 1.8.1) + jekyll-redirect-from (~> 0.16) + rouge (~> 3.26) BUNDLED WITH 2.3.8 From c6c8f869780f29898441f081b177382136b9f615 Mon Sep 17 00:00:00 2001 From: Nicholas Chammas Date: Wed, 10 Jan 2024 13:38:45 -0500 Subject: [PATCH 2/4] specify ruby 3 and python 3 --- docs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index 09b2b9b5b41ad..fac9010d86922 100644 --- a/docs/README.md +++ b/docs/README.md @@ -30,7 +30,7 @@ whichever version of Spark you currently have checked out of revision control. The Spark documentation build uses a number of tools to build HTML docs and API docs in Scala, Java, Python, R, and SQL. -You need to have [Ruby][ruby] and [Python][python] installed. Make sure the `bundle` command is available. If not, install it as follows: +You need to have [Ruby 3][ruby] and [Python 3][python] installed. Make sure the `bundle` command is available. If not, install it as follows: [ruby]: https://www.ruby-lang.org/en/documentation/installation/ [python]: https://www.python.org/downloads/ From e1e8eebb8f724cdbe80f6f731b04881ee534a301 Mon Sep 17 00:00:00 2001 From: Nicholas Chammas Date: Wed, 10 Jan 2024 13:39:05 -0500 Subject: [PATCH 3/4] add some clarifying comments --- docs/.bundle/config | 1 + docs/_plugins/copy_api_dirs.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/.bundle/config b/docs/.bundle/config index 68c1ee493a2aa..a2fa47de8b4f4 100644 --- a/docs/.bundle/config +++ b/docs/.bundle/config @@ -1,3 +1,4 @@ --- BUNDLE_PATH: ".local_ruby_bundle" +# See: https://issues.apache.org/jira/browse/SPARK-38488 BUNDLE_BUILD__FFI: "--enable-libffi-alloc" diff --git a/docs/_plugins/copy_api_dirs.rb b/docs/_plugins/copy_api_dirs.rb index ec9127e516593..3ceea185464ce 100644 --- a/docs/_plugins/copy_api_dirs.rb +++ b/docs/_plugins/copy_api_dirs.rb @@ -15,6 +15,7 @@ # limitations under the License. # +# This include enables functions like `cd` and `cp_r`. require 'fileutils' include FileUtils From 50f021a59a002f831fb0e37bf63674a4ebc70e3b Mon Sep 17 00:00:00 2001 From: Nicholas Chammas Date: Wed, 10 Jan 2024 14:00:30 -0500 Subject: [PATCH 4/4] using newer version of bundler --- docs/Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index 242fef08f71ef..4e38f18703f3c 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -74,4 +74,4 @@ DEPENDENCIES rouge (~> 3.26) BUNDLED WITH - 2.3.8 + 2.4.22