[JAVA-4577] Gradle task doesn't appear to build scala driver API docs Created: 15/Apr/22  Updated: 28/Oct/23  Resolved: 19/Apr/22

Status: Closed
Project: Java Driver
Component/s: Documentation
Affects Version/s: None
Fix Version/s: 4.7.0

Type: Improvement Priority: Minor - P4
Reporter: Christopher Cho Assignee: Ross Lawley
Resolution: Fixed Votes: 0
Labels: internal-user
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends

 Description   

Summary

The "gradlew docs" command and target, run from the root of the mongodb-java-driver repository, is expected to generates API documentation for the JVM drivers in the build/docs directory, but it currently omits the scala API docs.

Here's the output from the run (I think it only shows scala tasks since the rest of the API docs were already built in my directory
:

❯ ./gradlew clean docs
Starting a Gradle Daemon (subsequent builds will be faster)
 
> Task :bson-scala:compileScala
[Warn] : 17 deprecations (since 2.13.0); re-run with -deprecation for details
one warning found
 
> Task :driver-scala:compileScala
[Warn] : 2 deprecations
[Warn] : 108 deprecations (since 2.13.0)
[Warn] : 110 deprecations in total; re-run with -deprecation for details
three warnings found
 
BUILD SUCCESSFUL in 1m 18s
38 actionable tasks: 36 executed, 2 up-to-date

Here's the directory listing in build/docs:

bson/
mongodb-driver-core/
mongodb-driver-sync/
mongodb-driver-legacy/
mongodb-driver-reactivestreams/

This appears to be missing the scala API documentation directory.

Please provide the version of the driver. If applicable, please provide the MongoDB server version and topology (standalone, replica set, or sharded cluster).

Only tested the gradle script on the r4.5.0 branch since the r4.4.0 version appears to require a version of the JRE I don't currently have installed.

How to Reproduce

Steps to reproduce. If possible, please include a Short, Self Contained, Correct (Compilable), Example.

Additional Background

Please provide any additional background information that may be helpful in diagnosing the bug.



 Comments   
Comment by Ross Lawley [ 19/Apr/22 ]

Hi jeff.yemin@mongodb.com,

The cause of the issue seems to be related to Gradle and how we configure the build - a reliance of tasks with type scaladoc and the creation of a task in a sub project. I've added JAVA-4581 to track cleaning up the build and moving towards the gradle conventions.

Ross

Comment by Ross Lawley [ 19/Apr/22 ]

Hi chris.cho@mongodb.com,

I've fixed the issue in master but on the 4.5 and 4.6 branches please also run:

./gradlew aggregatedScalaDoc

To get the scala docs.

Ross

Comment by Githook User [ 19/Apr/22 ]

Author:

{'name': 'Ross Lawley', 'email': 'ross.lawley@gmail.com', 'username': 'rozza'}

Message: Ensure docs task also runs aggregatedScalaDoc

JAVA-4577
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/59f511eec0b9351db384df6a5f6f7e6f63eb8a80

Comment by Jeffrey Yemin [ 15/Apr/22 ]

Confirmed that on the 4.4 branch there is a mongo-scala-driver directory in build/docs.

Generated at Thu Feb 08 09:02:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.