Skip to content

Commit

Permalink
Fix documentation in JavaInfo to avoid circular reference.
Browse files Browse the repository at this point in the history
Mark transitive_runtime_deps deprecated in favour of transitive_runtime_jars.
Mark transitive_deps deprecated in favour of transitive_compile_time_jars.

There might be personal opinions about that (_jars prefix is more common in java_common), but just saying that both getters are legacy and not saying which one to use creates an unnecessary cognitive load.

PiperOrigin-RevId: 411974807
  • Loading branch information
comius authored and copybara-github committed Nov 24, 2021
1 parent 6dfedb0 commit 46d5936
Showing 1 changed file with 7 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,13 @@ public interface JavaInfoApi<

@StarlarkMethod(
name = "transitive_runtime_jars",
doc =
"Returns a transitive set of Jars required on the target's runtime classpath. Returns"
+ " the same as <code><a class=\"anchor\""
+ " href=\"JavaInfo.html#transitive_runtime_deps\">JavaInfo.transitive_runtime_deps"
+ "</a></code> for legacy reasons.",
doc = "Returns a transitive set of Jars required on the target's runtime classpath.",
structField = true)
Depset getTransitiveRuntimeJars();

@StarlarkMethod(
name = "transitive_compile_time_jars",
doc =
"Returns the transitive set of Jars required to build the target. Returns the same as"
+ " <code><a class=\"anchor\""
+ " href=\"JavaInfo.html#transitive_deps\">JavaInfo.transitive_deps</a></code> for"
+ " legacy reasons.",
doc = "Returns the transitive set of Jars required to build the target.",
structField = true)
Depset getTransitiveCompileTimeJars();

Expand Down Expand Up @@ -139,20 +131,18 @@ public interface JavaInfoApi<
@StarlarkMethod(
name = "transitive_deps",
doc =
"Returns the transitive set of Jars required to build the target. Returns the same as"
+ " <code><a class=\"anchor\""
+ " href=\"JavaInfo.html#transitive_compile_time_jars\">JavaInfo.transitive_compile_time_jars</a></code>"
+ " for legacy reasons.",
"Deprecated: Please use <code><a class=\"anchor\" "
+ "href=\"JavaInfo.html#transitive_compile_time_jars\">JavaInfo.transitive_compile_time_jars</a></code>"
+ " instead. It returns the same value.",
structField = true)
Depset /*<FileT>*/ getTransitiveDeps();

@StarlarkMethod(
name = "transitive_runtime_deps",
doc =
"Returns the transitive set of Jars required on the target's runtime classpath. Returns"
+ " the same as <code><a class=\"anchor\""
"Deprecated: please use <code><a class=\"anchor\""
+ " href=\"JavaInfo.html#transitive_runtime_jars\">JavaInfo.transitive_runtime_jars"
+ "</a></code> for legacy reasons.",
+ "</a></code> instead. It returns the same value",
structField = true)
Depset /*<FileT>*/ getTransitiveRuntimeDeps();

Expand Down

0 comments on commit 46d5936

Please sign in to comment.