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

hover types fails with type alias #6315

Closed
andyczerwonka opened this issue Apr 17, 2024 · 5 comments
Closed

hover types fails with type alias #6315

andyczerwonka opened this issue Apr 17, 2024 · 5 comments
Labels
bug Something that is making a piece of functionality unusable needs more information Use if we need more information for a specific ticket presentation-compiler Something relating to the presentation compiler Scala 2

Comments

@andyczerwonka
Copy link
Contributor

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 andyczerwonka changed the title hover types failes with type alias hover types fails with type alias Apr 17, 2024
@kasiaMarek
Copy link
Contributor

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 kasiaMarek added bug Something that is making a piece of functionality unusable presentation-compiler Something relating to the presentation compiler labels Apr 17, 2024
@andyczerwonka
Copy link
Contributor Author

@kasiaMarek 2.13.12

The Open a Github Issue fails for me.
image

@andyczerwonka
Copy link
Contributor Author

I was able to generate the reports.
reports.zip

@kasiaMarek
Copy link
Contributor

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 kasiaMarek added the needs more information Use if we need more information for a specific ticket label Apr 22, 2024
@kasiaMarek kasiaMarek removed this from Triage in Metals Issue Board Apr 22, 2024
Copy link

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 github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is making a piece of functionality unusable needs more information Use if we need more information for a specific ticket presentation-compiler Something relating to the presentation compiler Scala 2
Projects
None yet
Development

No branches or pull requests

2 participants