Skip to content

Commit

Permalink
[SPARK-29569][BUILD][DOCS] Copy and paste minified jquery instead whe…
Browse files Browse the repository at this point in the history
…n post-processing badges in JavaDoc

### What changes were proposed in this pull request?

This PR fixes our documentation build to copy minified jquery file instead.

The original file `jquery.js` seems missing as of Scala 2.12 upgrade. Scala 2.12 seems started to use minified `jquery.min.js` instead.

Since we dropped Scala 2.11, we won't have to take care about legacy `jquery.js` anymore.

Note that, there seem multiple weird stuff in the current ScalaDoc (e.g., some pages are weird, it starts from `scala.collection.*` or some pages are missing, or some docs are truncated, some badges look missing). It needs a separate double check and investigation.

This PR targets to make the documentation generation pass in order to unblock Spark 3.0 preview.

### Why are the changes needed?

To fix and make our official documentation build able to run.

### Does this PR introduce any user-facing change?

It will enable to build the documentation in our official way.

**Before:**

```
Making directory api/scala
cp -r ../target/scala-2.12/unidoc/. api/scala
Making directory api/java
cp -r ../target/javaunidoc/. api/java
Updating JavaDoc files for badge post-processing
Copying jquery.js from Scala API to Java API for page post-processing of badges
jekyll 3.8.6 | Error:  No such file or directory  rb_sysopen - ./api/scala/lib/jquery.js
```

**After:**

```
Making directory api/scala
cp -r ../target/scala-2.12/unidoc/. api/scala
Making directory api/java
cp -r ../target/javaunidoc/. api/java
Updating JavaDoc files for badge post-processing
Copying jquery.min.js from Scala API to Java API for page post-processing of badges
Copying api_javadocs.js to Java API for page post-processing of badges
Appending content of api-javadocs.css to JavaDoc stylesheet.css for badge styles
...
```

### How was this patch tested?

Manually tested via:

```
SKIP_PYTHONDOC=1 SKIP_RDOC=1 SKIP_SQLDOC=1 jekyll build
```

Closes apache#26228 from HyukjinKwon/SPARK-29569.

Authored-by: HyukjinKwon <gurwls223@apache.org>
Signed-off-by: Xingbo Jiang <xingbo.jiang@databricks.com>
  • Loading branch information
HyukjinKwon authored and jiangxb1987 committed Oct 23, 2019
1 parent 0a70951 commit df00b5c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/_plugins/copy_api_dirs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@
end
# End updating JavaDoc files for badge post-processing

puts "Copying jquery.js from Scala API to Java API for page post-processing of badges"
jquery_src_file = "./api/scala/lib/jquery.js"
jquery_dest_file = "./api/java/lib/jquery.js"
puts "Copying jquery.min.js from Scala API to Java API for page post-processing of badges"
jquery_src_file = "./api/scala/lib/jquery.min.js"
jquery_dest_file = "./api/java/lib/jquery.min.js"
mkdir_p("./api/java/lib")
cp(jquery_src_file, jquery_dest_file)

Expand Down

0 comments on commit df00b5c

Please sign in to comment.