Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug build failure with KeyedBroadcastProcessFunction #1

Closed
wants to merge 8 commits into from

Conversation

eikel
Copy link
Owner

@eikel eikel commented Aug 19, 2022

For testing purposes, I added a new example 11 to this branch which is a copy of a working example from the original repository (see first commit). I added a new class MyFunction that extends KeyedBroadcastProcessFunction (see second commit). This builds without problems with Scala 3.0.2 (used in the original repository). I then tried to update the Scala version (first to 3.1.0, then to 3.1.3; see commits three and four) and with both the compilation breaks with:

[error] -- Error: …/flink-scala-3/src/main/scala/com/ververica/Example_11_KeyedBroadcastProcessFunction.scala:65:6 
[error] 65 |class MyFunction
[error]    |      ^
[error]    |bridge generated for member object ReadOnlyContextKeyedBroadcastProcessFunction.this.ReadOnlyContext in class KeyedBroadcastProcessFunction
[error]    |which overrides object ReadOnlyContextBaseBroadcastProcessFunction.this.ReadOnlyContext in class BaseBroadcastProcessFunction
[error]    |clashes with definition of the member itself; both have erased type KeyedBroadcastProcessFunction.this.ReadOnlyContext."
[error] one error found
[error] (Compile / compileIncremental) Compilation failed

I see no way to fix this in the code extending KeyedBroadcastProcessFunction. Does this have to be fixed in the Flink upstream code? Or is this a bug in the Scala compiler (e.g., scala/bug#8702, scala/bug#10082)?

This makes the examples easier to reproduce, as those versions can be
retrieved from central Maven repositories.
Currently, it is a modified copy of example 6.
Warning: This breaks the build.
@eikel
Copy link
Owner Author

eikel commented Aug 19, 2022

@sjwiesman As you have created the original Flink + Scala 3 examples, maybe you have an idea what might be the reason for this build failure?

@eikel
Copy link
Owner Author

eikel commented Aug 31, 2022

Still the same error with Scala 3.2.0.

@eikel
Copy link
Owner Author

eikel commented Nov 10, 2022

Updating to Scala 3.2.1 fixes the issue. It seems to be the same as scala/scala3#15199.

@eikel eikel closed this Nov 10, 2022
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.

1 participant