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

(heisenbug) annotation.Int shown instead of Int in completions sometimes #6794

Open
kubukoz opened this issue Sep 21, 2024 · 2 comments
Open

Comments

@kubukoz
Copy link
Contributor

kubukoz commented Sep 21, 2024

Describe the bug

I first bumped into this in a small codebase, but it had a few more dependencies so I tried to isolate it to just fs2.

Although I don't have a reliable reproduction, I managed to hit this again with just fs2 in a fairly short recording (starts with a metals restart - see below)

This is on Scala 3.5.0, with scala-cli.

Actual behavior:

heisenbug

It happens once or twice and never happens again... until it does. Feels very random.

How I got there:

compressed.mp4

(I tried all sorts of things that could mess with the state, e.g. creating a new file, completing on a broken file etc.)

Initial code:

//> using dep co.fs2::fs2-core:3.11.0
import cats.effect.IO

object main {

  def asdf(s: fs2.Stream[IO, Int]) =
    s
      .as(42)
      .buffer(1902379)
      .buffer(???)
      .flatMap(_ => fs2.Stream.unit.covary[IO])

  def x(a: IO[Unit]) = IO
    .uncancelable(_ => a.delayBy(???))
    .andWait(???) *> a *> a <* a

}

Expected behavior

image

Operating system

macOS

Editor/Extension

VS Code

Version of Metals

v1.3.5

Extra context or search terms

No response

@tgodzik
Copy link
Contributor

tgodzik commented Sep 24, 2024

Thanks for reporting! Any chance you could attach the code in question?

@kubukoz
Copy link
Contributor Author

kubukoz commented Sep 24, 2024

oops, sorry. Added to the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Triage
Development

No branches or pull requests

2 participants