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

Fix compiler warnings #4934

Merged
merged 4 commits into from
Aug 21, 2023
Merged

Fix compiler warnings #4934

merged 4 commits into from
Aug 21, 2023

Conversation

RustedBones
Copy link
Contributor

Fix compiler warnings

  • remove deprecated compiler option and accept non unit statements
  • remove unused method parameters (breaking changes for v0.14)
  • silence required unused parameter (eg IsJavaBean evidence)
  • set explicit types on implicits
  • fix implicit type conversion (mostly widening)
  • add @uncheked annotations in pattern matching when required
  • avoid usage of slow avro generic coder (provide schema)

@kellen
Copy link
Contributor

kellen commented Jul 24, 2023

Seems to have broken some tests ;)

@RustedBones
Copy link
Contributor Author

Yes. will unset draft as soon as those are fixed.

@@ -22,7 +22,7 @@ import com.spotify.scio.coders.Coder
import com.google.common.{hash => g}
import org.apache.beam.sdk.coders.CustomCoder

class GuavaBloomFilterCoder[T](implicit val funnel: g.Funnel[T])
class GuavaBloomFilterCoder[T](implicit val funnel: g.Funnel[_ >: T])
Copy link
Contributor Author

Choose a reason for hiding this comment

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

BLoomFilter[String] can be created from a Funnel[CharSequence] (expected funnel is <? extends T>).
Associated coder should also be able to be constructed with such funnel

@codecov
Copy link

codecov bot commented Jul 31, 2023

Codecov Report

Merging #4934 (5c8678c) into v0.14.x (308f332) will increase coverage by 0.25%.
Report is 8 commits behind head on v0.14.x.
The diff coverage is 87.21%.

❗ Current head 5c8678c differs from pull request most recent head e43e452. Consider uploading reports for the commit e43e452 to get more accurate results

@@             Coverage Diff             @@
##           v0.14.x    #4934      +/-   ##
===========================================
+ Coverage    62.98%   63.23%   +0.25%     
===========================================
  Files          282      284       +2     
  Lines        10648    10669      +21     
  Branches       789      783       -6     
===========================================
+ Hits          6707     6747      +40     
+ Misses        3941     3922      -19     
Files Changed Coverage Δ
...src/main/scala/com/spotify/scio/avro/package.scala 100.00% <ø> (ø)
...fy/scio/avro/schemas/instances/AvroInstances.scala 0.00% <ø> (ø)
.../scala/com/spotify/scio/coders/AvroBytesUtil.scala 100.00% <ø> (ø)
.../com/spotify/scio/protobuf/util/ProtobufUtil.scala 100.00% <ø> (ø)
...src/main/scala/com/spotify/scio/coders/Coder.scala 93.47% <ø> (ø)
...om/spotify/scio/coders/instances/GuavaCoders.scala 100.00% <ø> (ø)
...potify/scio/estimators/ApproxDistinctCounter.scala 100.00% <ø> (ø)
...ify/scio/io/dynamic/syntax/SCollectionSyntax.scala 88.88% <ø> (-1.50%) ⬇️
...c/main/scala/com/spotify/scio/schemas/Schema.scala 68.18% <ø> (ø)
...spotify/scio/schemas/instances/JavaInstances.scala 48.14% <ø> (ø)
... and 48 more

... and 4 files with indirect coverage changes

@RustedBones RustedBones marked this pull request as ready for review July 31, 2023 10:34
Copy link
Contributor

@kellen kellen left a comment

Choose a reason for hiding this comment

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

love it

@RustedBones RustedBones merged commit d97f038 into v0.14.x Aug 21, 2023
10 checks passed
@RustedBones RustedBones deleted the fix-compiler-warnings branch August 21, 2023 15:00
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.

None yet

2 participants