[
https://issues.apache.org/jira/browse/FLINK-12300?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Flink Jira Bot updated FLINK-12300:
-----------------------------------
Labels: auto-deprioritized-major auto-deprioritized-minor (was:
auto-deprioritized-major stale-minor)
Priority: Not a Priority (was: Minor)
This issue was labeled "stale-minor" 7 days ago and has not received any
updates so it is being deprioritized. If this ticket is actually Minor, please
raise the priority and ask a committer to assign you the issue or revive the
public discussion.
> Unused Import warning with DataStream[Seq[...]]
> -----------------------------------------------
>
> Key: FLINK-12300
> URL: https://issues.apache.org/jira/browse/FLINK-12300
> Project: Flink
> Issue Type: Bug
> Components: API / Scala
> Affects Versions: 1.8.0
> Reporter: Michael
> Priority: Not a Priority
> Labels: auto-deprioritized-major, auto-deprioritized-minor
>
> There is a regression in Flink 1.8.0 compared to 1.7.2 using Scala...
> When enabling unused import warnings in *build.sbt*:
> {code:scala}
> scalacOptions ++= Seq("-Xfatal-warnings", "-Ywarn-unused-import")
> {code}
> ...and compiling a file with this content:
> {code:scala}
> package com.example.unusedimportissue
> import org.apache.flink.streaming.api.scala._
> object ExampleSeqDataStream {
> def doubleElement(numbers: DataStream[Int]): DataStream[Seq[Int]] = {
> numbers.map(x => Seq(x, x))
> }
> }
> {code}
> Then with Flink 1.8.0 this compile issue happens (while with Flink 1.7.2
> everything compiles fine):
> {noformat}
> [error] /path/to/com/example/unusedimportissue/example.scala:1:0: Unused
> import
> [error] package com.example.unusedimportissue
> [error] ^
> {noformat}
> If the result type {{DataStream[Seq[Int]]}} is replaced by
> {{DataStream[Int]}}, then this issue does not occur, so it is related to the
> {{Seq[...]}} type.
> Maybe a Flink macro is generating an import that is not used, resulting in
> this error?
--
This message was sent by Atlassian Jira
(v8.20.1#820001)