Skip to content

disneystreaming/smithy4s v0.16.8 #16335

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

Closed
dwijnand opened this issue Nov 14, 2022 · 1 comment
Closed

disneystreaming/smithy4s v0.16.8 #16335

dwijnand opened this issue Nov 14, 2022 · 1 comment
Labels
area:typer itype:bug regression This worked in a previous version but doesn't anymore

Comments

@dwijnand
Copy link
Member

[error] [core3] -- Error: /home/jenkins/agent/workspace/buildCommunityProject/repo/modules/core/test/src/smithy4s/ProductSerialSmokeSpec.scala:29:45 
[error] [core3] 29 |    expect(List(product, serial, foo).forall(_ != null))
[error] [core3]    |                                             ^^^^^^^^^
[error] [core3]    |Values of types object smithy4s.example.Product | object smithy4s.example.Serializable | object
[error] [core3]    |  smithy4s.example.FooEnum.FOO and Null cannot be compared with == or !=
[error] [core3] one error found
[error] [core3] (core3 / Test / compileIncremental) Compilation failed

Explicit nulls not enabled in the project

 
  test(
    "Enumeration compiles when shapes called Product or Serializable exist"
  ) {
   // Classess generated from schema
    val product = smithy4s.example.Product
    val serial = smithy4s.example.Serializable
    val foo = smithy4s.example.FooEnum.FOO
    expect(List(product, serial, foo).forall(_ != null))
  }

Related:
monix/monix-connect v0.9.0 Open CB #20502

    // Java defined class
    val request: PutObjectRequest =
      S3RequestBuilder
        .putObjectRequest(bucket, key, contentLenght, uploadSettings)

    request.contentLength shouldBe contentLenght.getOrElse(null)
[error] -- Error: /home/jenkins/agent/workspace/buildCommunityProject/repo/s3/src/test/scala/monix.connect.s3/S3RequestBuilderSpec.scala:298:64 
[error] 298 |    request.contentLength shouldBe contentLenght.getOrElse(null)
[error]     |                                                                ^
[error]     | Values of types Long and Long | Null cannot be compared with == or !=
[warn] 11 warnings found
@dwijnand dwijnand added itype:bug area:typer regression This worked in a previous version but doesn't anymore labels Nov 14, 2022
@dwijnand
Copy link
Member Author

From Martin: The new behavior seems to be correct. The value can indeed not be compared to null.

The objects can never be null, so the test was redundant. The inference change in #15642 is likely what caused this to appear.

@dwijnand dwijnand closed this as not planned Won't fix, can't repro, duplicate, stale Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:typer itype:bug regression This worked in a previous version but doesn't anymore
Projects
None yet
Development

No branches or pull requests

1 participant