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

Adding a private lazy val introduces a binary incompability in Scala 3 #794

Open
MaciejG604 opened this issue Nov 27, 2023 · 2 comments
Open

Comments

@MaciejG604
Copy link

Discovered in com-lihaoyi/os-lib#239

When building with Scala 3.1.3
Changing:

package object bar {
  val foo = compute
}

to

package object bar {
  private lazy val _foo = compute
  def foo = _foo
}

Breaks binary compatibility. Is this expected?

@SethTisue
Copy link
Collaborator

SethTisue commented Nov 27, 2023

Offhand I don't know. Have you looked at the bytecode? MiMa doesn't understand source-level constructs — it's looking at bytecode.

It would also help discussion to know: what is the complete, exact message MiMa prints? What precisely is it complaining about?

@lefou
Copy link
Contributor

lefou commented Nov 27, 2023

Here is the reported issue:

 Found 1 issue when checking against com.lihaoyi:os-lib_3:0.9.2
 * static method <clinit>()Unit in object os.package does not have a correspondent in current version
   filter with: ProblemFilter.exclude[DirectMissingMethodProblem]("os.package.<clinit>")

https://github.com/com-lihaoyi/os-lib/actions/runs/6959284130/job/18942155280

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants