KAFKA-9907: Switch default build to Scala 2.13 (#8537)

Scala 2.13.2 introduces support for suppressing warnings,
which makes it possible to enable fatal warnings. This is
useful enough from a development perspective to justify
this change.

In addition, Scala 2.13.2 also has a Vector implementation
with significant performance improvements and encoding
of String matches to switches.

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
This commit is contained in:
Ismael Juma 2020-04-23 07:02:54 -07:00 committed by GitHub
parent 402f2c1ece
commit dbe618c63c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 8 additions and 8 deletions

View File

@ -6,7 +6,7 @@ You need to have [Java](http://www.oracle.com/technetwork/java/javase/downloads/
Java 8 should be used for building in order to support both Java 8 and Java 11 at runtime.
Scala 2.12 is used by default, see below for how to use a different Scala version or all of the supported Scala versions.
Scala 2.13 is used by default, see below for how to use a different Scala version or all of the supported Scala versions.
### Build a jar and run it ###
./gradlew jar

View File

@ -48,7 +48,7 @@ should_include_file() {
base_dir=$(dirname $0)/..
if [ -z "$SCALA_VERSION" ]; then
SCALA_VERSION=2.12.11
SCALA_VERSION=2.13.2
if [[ -f "$base_dir/gradle.properties" ]]; then
SCALA_VERSION=`grep "^scalaVersion=" "$base_dir/gradle.properties" | cut -d= -f 2`
fi

View File

@ -27,7 +27,7 @@ set BASE_DIR=%CD%
popd
IF ["%SCALA_VERSION%"] EQU [""] (
set SCALA_VERSION=2.12.11
set SCALA_VERSION=2.13.2
)
IF ["%SCALA_BINARY_VERSION%"] EQU [""] (

View File

@ -20,5 +20,5 @@ var context={
"version": "26",
"dotVersion": "2.6",
"fullDotVersion": "2.6.0",
"scalaVersion": "2.12"
"scalaVersion": "2.13"
};

View File

@ -21,6 +21,6 @@ group=org.apache.kafka
# - tests/kafkatest/version.py (variable DEV_VERSION)
# - kafka-merge-pr.py
version=2.6.0-SNAPSHOT
scalaVersion=2.12.11
scalaVersion=2.13.2
task=build
org.gradle.jvmargs=-Xmx1024m -Xss2m

View File

@ -264,7 +264,7 @@ def command_stage_docs():
cmd("Building docs", "./gradlew -Pversion=%s clean aggregatedJavadoc" % gradle_version_override, cwd=REPO_HOME, env=jdk8_env)
docs_tar = os.path.join(REPO_HOME, 'core', 'build', 'distributions', 'kafka_2.12-%s-site-docs.tgz' % gradle_version_override)
docs_tar = os.path.join(REPO_HOME, 'core', 'build', 'distributions', 'kafka_2.13-%s-site-docs.tgz' % gradle_version_override)
versioned_docs_path = os.path.join(kafka_site_repo_path, docs_version(version))
if not os.path.exists(versioned_docs_path):
@ -663,8 +663,8 @@ Now you should sanity check it before proceeding. All subsequent steps start mak
Some suggested steps:
* Grab the source archive and make sure it compiles: https://home.apache.org/~%(apache_id)s/kafka-%(rc_tag)s/kafka-%(release_version)s-src.tgz
* Grab one of the binary distros and run the quickstarts against them: https://home.apache.org/~%(apache_id)s/kafka-%(rc_tag)s/kafka_2.12-%(release_version)s.tgz
* Extract and verify one of the site docs jars: https://home.apache.org/~%(apache_id)s/kafka-%(rc_tag)s/kafka_2.12-%(release_version)s-site-docs.tgz
* Grab one of the binary distros and run the quickstarts against them: https://home.apache.org/~%(apache_id)s/kafka-%(rc_tag)s/kafka_2.13-%(release_version)s.tgz
* Extract and verify one of the site docs jars: https://home.apache.org/~%(apache_id)s/kafka-%(rc_tag)s/kafka_2.13-%(release_version)s-site-docs.tgz
* Build a sample against jars in the staging repo: (TODO: Can we get a temporary URL before "closing" the staged artifacts?)
* Validate GPG signatures on at least one file:
wget https://home.apache.org/~%(apache_id)s/kafka-%(rc_tag)s/kafka-%(release_version)s-src.tgz &&