wide-bird-64577
01/24/2022, 7:08 PMMappingError: Failed to parse 3rdparty/jvm/org/apache/flink/BUILD:
AttributeError("'JarDependency' object has no attribute 'with_docs'")
hundreds-father-404
01/24/2022, 7:10 PMwith_docs()
thing would only work with v1wide-bird-64577
01/24/2022, 7:11 PMhundreds-father-404
01/24/2022, 7:12 PMwide-bird-64577
01/24/2022, 7:12 PM#VERSION = '1.13.5'
VERSION = '1.11.0'
SCALA_REV = '2.12'
jar_library(name = 'flink-core',
jars = [
jar('org.apache.flink', 'flink-core', VERSION)
])
jar_library(name = 'flink-scala',
jars = [
jar('org.apache.flink', 'flink-scala_{}'.format(SCALA_REV), VERSION)
],
)
jar_library(name = 'flink-streaming-scala',
jars = [
jar('org.apache.flink', 'flink-streaming-scala_{}'.format(SCALA_REV), VERSION).with_docs()
],
)
jar_library(name = 'flink-runtime',
jars = [
jar('org.apache.flink', 'flink-runtime_{}'.format(SCALA_REV), VERSION)
],
)
jar_library(name = 'flink-runtime-web',
jars = [
jar('org.apache.flink', 'flink-runtime-web_{}'.format(SCALA_REV), VERSION)
],
)
jar_library(name = 'flink-streaming-java',
jars = [
jar('org.apache.flink', 'flink-streaming-java_{}'.format(SCALA_REV), VERSION)
],
)
jar_library(name = 'flink-streaming-java-tests',
jars = [
jar('org.apache.flink', 'flink-streaming-java_{}'.format(SCALA_REV), VERSION, classifier = 'tests')
],
scope='test',
)
jar_library(name = 'flink-connector-kafka',
jars = [
jar('org.apache.flink', 'flink-connector-kafka_{}'.format(SCALA_REV), VERSION)
]
)
jar_library(name = 'flink-statebackend-rocksdb',
jars = [
jar('org.apache.flink', 'flink-statebackend-rocksdb_{}'.format(SCALA_REV), VERSION)
],
scope='compile test',
)
jar_library(name = 'flink-test-utils',
jars = [
jar('org.apache.flink', 'flink-test-utils_{}'.format(SCALA_REV), VERSION)
],
)
hundreds-father-404
01/24/2022, 7:13 PMI have seen somewhere that I have to go with something like jar(…).with_docs() but that gives mDo you happen to remember where you saw that? Btw v1 docs are at https://v1.pantsbuild.org
wide-bird-64577
01/24/2022, 7:16 PMhundreds-father-404
01/24/2022, 7:42 PMis there a way to pull the package with the javadoc?I'm not very familiar with JVM -- what does this concretely mean? Is there an additional JAR with documentation included? Or you need to pull one JAR rather than another?
wide-bird-64577
01/24/2022, 7:45 PMRelease Notes
In this release, the methods with_sources(), with_docs() and with_artifact() were removed from the jar() syntax in BUILD files. They have been deprecated since Pants version 0.0.29.
hundreds-father-404
01/24/2022, 7:47 PMyeah there are jars with documentation included, with source code included etc.How would you choose which JAR to use if you weren't using Pants and were using something like Gradle or Couriser directly? I suspect
.with_docs()
was somehow mutating the jar()
call to point to a different artifact, so you would instead directly point to the one you wantenough-analyst-54434
01/24/2022, 7:54 PM./pants export ...
. See: https://v1.pantsbuild.org/export.html
You activate javadocs via: https://github.com/pantsbuild/pants/blob/1.30.x/src/python/pants/backend/project_info/tasks/export.py#L103
When Coursier replaced Ivy, it shipped without this support. Later it was added here: https://github.com/pantsbuild/pants/pull/5254wide-bird-64577
01/24/2022, 7:56 PMhundreds-father-404
01/24/2022, 8:19 PMwide-bird-64577
01/24/2022, 8:22 PMenough-analyst-54434
01/24/2022, 8:37 PMwide-bird-64577
01/24/2022, 8:45 PMhappy-kitchen-89482
01/25/2022, 3:52 AMdependencies=
in your BUILD files, because they're inferred from the import
statements in your code.