Skip to content

Error no member new scala.beans.BeanProperty . <init> under first incremental compilation #19421

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
WojciechMazur opened this issue Jan 11, 2024 · 4 comments · Fixed by #19926
Assignees
Labels
area:incremental-compilation area:typer itype:bug regression This worked in a previous version but doesn't anymore
Milestone

Comments

@WojciechMazur
Copy link
Contributor

Failure found in OpenCB for j5ik2o/akka-persistence-s3 - build logs

When compiling project for the first time it can fail with no BeanPropert constructor. When compiling for the second time it is able to finish compilation.

Compiler version

Last good release: 3.4.0-RC1-bin-20231115-0420aaf-NIGHTLY
First bad release: 3.4.0-RC1-bin-20231116-fdf8de3-NIGHTLY
Bisect points to d04b3c7
Present in 3.4.0-RC1, not present in 3.3.2-RC1

Minimized code

No minimisation. The project itself does not use @BeanProperty, it might be used somewhere in the upstream.
To reproduce:

git clone https://github.com/j5ik2o/akka-persistence-s3.git -b v1.2.177 repo
cd repo 
sbt "++${ScalaVersion};clean;Test/compile"

Output

One of projects would fail with:

[error] no member new scala.beans.BeanProperty . <init>
[error] value <none>: <notype> does not take parameters
[error] two errors found
[error] (journal / Test / compileIncremental) Compilation failed```

Expectation

Data race? should be fixed to prevent spurious failures

@WojciechMazur WojciechMazur added itype:bug area:typer regression This worked in a previous version but doesn't anymore area:incremental-compilation labels Jan 11, 2024
@WojciechMazur WojciechMazur added this to the 3.4.0 milestone Jan 11, 2024
@xuwei-k
Copy link
Contributor

xuwei-k commented Jan 24, 2024

same error in my private repo 😢

@nicolasstucki
Copy link
Contributor

The issue in this case happens when loading actor https://github.com/akka/akka/blob/v2.9.1/akka-actor/src/main/scala/akka/actor/Actor.scala#L113. This definition is skipped here d04b3c7#diff-9919eb5ea021e001a170f43b5f56fbab5e79aaadfeb947b2974a533f116b9e84R454. If we do not skip it we fix the issue. The complication is that we do not know the annotations when we create the symbol.

@nicolasstucki

This comment was marked as outdated.

@Kordyjan Kordyjan modified the milestones: 3.4.0, Future versions Feb 14, 2024
@nicolasstucki
Copy link
Contributor

Minimization

project/build.properties

sbt.version = 1.6.2

build.sbt

lazy val root = (project in file("."))
  .settings(
    scalaVersion := "3.4.0",
    libraryDependencies ++= Seq(
      "com.typesafe.akka" %% "akka-persistence-tck" % "2.8.0"
    ).map(_.cross(CrossVersion.for3Use2_13))
  )

src/main/scala/S3SnapshotStoreSpec.scala

import com.typesafe.config.Config
import akka.persistence.snapshot.SnapshotStoreSpec

object ConfigHelper {
  def config(): Config = ???
}

class S3SnapshotStoreSpec extends SnapshotStoreSpec(null)
$ sbt "clean; compile; clean; compile"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:incremental-compilation area:typer itype:bug regression This worked in a previous version but doesn't anymore
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants