Skip to content

MINOR: Enable fatal warnings with scala 2.13#8429

Merged
ijuma merged 1 commit intoapache:trunkfrom
ijuma:enable-fatal-warnings-scala-2.13.2
Apr 23, 2020
Merged

MINOR: Enable fatal warnings with scala 2.13#8429
ijuma merged 1 commit intoapache:trunkfrom
ijuma:enable-fatal-warnings-scala-2.13.2

Conversation

@ijuma
Copy link
Copy Markdown
Member

@ijuma ijuma commented Apr 5, 2020

  • Upgrade to Scala 2.13.2 which introduces the ability to suppress warnings.
  • Upgrade to scala-collection-compat 2.1.6 as it introduces the
    @nowarn annotation for Scala 2.12.
  • While at it, also update scala-java8-compat to 0.9.1.
  • Fix compiler warnings and add @nowarn for the unfixed ones.

Scala 2.13.2 highlights (besides @nowarn):

  • Rewrite Vector (using "radix-balanced finger tree vectors"),
    for performance. Small vectors are now more compactly
    represented. Some operations are now drastically faster on
    large vectors. A few operations may be a little slower.
  • Matching strings makes switches in bytecode.

https://github.com/scala/scala/releases/tag/v2.13.2

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@ijuma
Copy link
Copy Markdown
Member Author

ijuma commented Apr 20, 2020

Will rebase after #8490 is merged. Scala 2.13.2 should be released within 1 to 2 weeks and is a requirement for this PR.

@ijuma ijuma force-pushed the enable-fatal-warnings-scala-2.13.2 branch 4 times, most recently from 38ddd97 to d56dcf9 Compare April 23, 2020 05:21
@ijuma ijuma marked this pull request as ready for review April 23, 2020 05:21
@ijuma ijuma requested a review from omkreddy April 23, 2020 05:27
* Upgrade to Scala 2.13.2 which introduces the ability to suppress
warnings.
* Upgrade to scala-collection-compat 2.1.6 as it introduces the
@nowarn annotation for Scala 2.12.
* While at it, also update scala-java8-compat to 0.9.1.
* Fix compiler warnings and add @nowarn for the unfixed ones.
@ijuma ijuma force-pushed the enable-fatal-warnings-scala-2.13.2 branch from d56dcf9 to 138c47d Compare April 23, 2020 05:31
Copy link
Copy Markdown
Contributor

@omkreddy omkreddy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ijuma Thanks for the PR. LGTM.

@ijuma ijuma merged commit c5ae154 into apache:trunk Apr 23, 2020
@ijuma ijuma deleted the enable-fatal-warnings-scala-2.13.2 branch April 23, 2020 07:44
@ijuma
Copy link
Copy Markdown
Member Author

ijuma commented Apr 23, 2020

Unrelated flaky test failure in 1 (out of 3) jobs:

kafka.integration.MetricsDuringTopicCreationDeletionTest.testMetricsDuringTopicCreateDelete

Comment thread build.gradle
if (versions.baseScala != '2.12') {
scalaCompileOptions.additionalParameters += ["-opt-warnings"]
// Scala 2.13.2 introduces compiler warnings suppression, which is a pre-requisite for -Xfatal-warnings
scalaCompileOptions.additionalParameters += ["-Xfatal-warnings"]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aka -Werror in 2.13 :-)

ijuma added a commit to ijuma/kafka that referenced this pull request Apr 29, 2020
…t-for-generated-requests

* apache-github/trunk: (366 commits)
  MINOR: Improve producer test BufferPoolTest#testCloseNotifyWaiters. (apache#7982)
  MINOR: document how to escape json parameters to ducktape tests (apache#8546)
  KAFKA-9885; Evict last members of a group when the maximum allowed is reached (apache#8525)
  KAFKA-9866: Avoid election for topics where preferred leader is not in ISR (apache#8524)
  KAFKA-9839; Broker should accept control requests with newer broker epoch (apache#8509)
  KAKFA-9612: Add an option to kafka-configs.sh to add configs from a prop file (KIP-574)
  MINOR: Partition is under reassignment when adding and removing (apache#8364)
  MINOR: reduce allocations in log start and recovery checkpoints (apache#8467)
  MINOR: Remove unused foreign-key join class (apache#8547)
  HOTFIX: Fix broker bounce system tests (apache#8532)
  KAFKA-9704: Fix the issue z/OS won't let us resize file when mmap. (apache#8224)
  KAFKA-8639: Replace AddPartitionsToTxn with Automated Protocol  (apache#8326)
  MINOR: equals() should compare all fields for generated classes (apache#8539)
  KAFKA-9844; Fix race condition which allows more than maximum number of members(apache#8454)
  KAFKA-9823: Remember the sent generation for the coordinator request (apache#8445)
  KAFKA-9883: Add better error message when REST API forwards a request and leader is not known (apache#8536)
  KAFKA-9907: Switch default build to Scala 2.13 (apache#8537)
  MINOR: Some html fixes in Streams DSL documentation (apache#8503)
  MINOR: Enable fatal warnings with scala 2.13 (apache#8429)
  KAFKA-9852: Change the max duration that calls to the buffer pool can block from 2000ms to 10ms to reduce overall test runtime (apache#8464)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants