metals icon indicating copy to clipboard operation
metals copied to clipboard

hover types fails with type alias

Open andyczerwonka opened this issue 10 months ago • 4 comments

Describe the bug

If I have a type alias, e.g.

type SessionEitherT[T] = EitherT[Future, SessionError, T]

and I have a method that returns that type alias

  private def loadCachedReadyPredictor(
      predictorId: PredictorId,
      version: EntityVersionInput,
      predictorClient: PredictorClient,
      acl: AccessControlSession,
      ctx: OrionContext
  ): SessionEitherT[LoadedPredictor] = { ...

if I use that method is a for comp, e.g.

val result = for {
      loadedPredictor <- loadCachedReadyPredictor(predictorId, version, predictorClient, acl, ctx)
...

Hovering over loadedPredictor does not show the type. If I change the return value to not use the type alias, it works.

Expected behavior

I expect the hover to work in all cases

Operating system

Linux

Editor/Extension

VS Code

Version of Metals

1.3.0

Extra context or search terms

No response

andyczerwonka avatar Apr 17 '24 00:04 andyczerwonka

Thanks for the report. Which Scala version are you using?

Side note: if you are using VS Code, you can click on Open a GitHub issue in the help and feedback tab, and this will collect some of the information about your workspace for you.

kasiaMarek avatar Apr 17 '24 08:04 kasiaMarek

@kasiaMarek 2.13.12

The Open a Github Issue fails for me. image

andyczerwonka avatar Apr 17 '24 14:04 andyczerwonka

I was able to generate the reports. reports.zip

andyczerwonka avatar Apr 17 '24 23:04 andyczerwonka

Are you able to reproduce it on a self-contained example? I tried doing more or less what you have in the example and it seems to work for me. Screenshot 2024-04-22 at 07 50 06

kasiaMarek avatar Apr 22 '24 05:04 kasiaMarek

This issue was closed because no new information was added for the last 30 days. If you have any relevant information, feel free to add it and reopen the issue.

github-actions[bot] avatar May 22 '24 10:05 github-actions[bot]