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

no build target found and Could not load snapshot text for for a particular file #6584

Open
doofin opened this issue Jul 11, 2024 · 5 comments
Labels
needs more information Use if we need more information for a specific ticket

Comments

@doofin
Copy link
Contributor

doofin commented Jul 11, 2024

Describe the bug

when I try to show the type of a variable it doesn't work, or just shown as Any when I insert type with code action. The code is fine and sbt compile works.

It happens in a cross js jvm project, not sure how to reproduce yet

metals .log:
`2024.07.11 11:14:11 INFO no build target found for /path/to/xx.scala. Using presentation compiler with project's scala-library version: 2.13.14

2024.07.11 11:19:23 WARN Could not load snapshot text for /path/to/xx.scala`

Expected behavior

should be able to show the type of a variable

Operating system

Linux

Editor/Extension

VS Code

Version of Metals

1.3.2

Extra context or search terms

scala 2.13.14
sbt.version=1.5.8

@tgodzik
Copy link
Contributor

tgodzik commented Jul 12, 2024

Thanks for reporting! This looks like the file is not recognized as part of the build structure. We would some more details however for a reproduction. If it is using Bloop, what build targets are generated, you can also check those targets in the doctor and see if there is one that is responsible for the file at hand.

@tgodzik tgodzik added the needs more information Use if we need more information for a specific ticket label Jul 12, 2024
@doofin
Copy link
Contributor Author

doofin commented Jul 15, 2024

yeah it's using bloop, The doctor shows ok status for the project containing the file(only complaint is that java src is missing but those are pure Scala files).

@tgodzik
Copy link
Contributor

tgodzik commented Jul 15, 2024

Still, we would need some more details. It's hard to see what is going on without a reproduction even a minimal one

@doofin
Copy link
Contributor Author

doofin commented Jul 23, 2024

are there more places for details aside from metals.log and doctor ?

@tgodzik
Copy link
Contributor

tgodzik commented Jul 23, 2024

You can click on the targets in the metals doctor to get all the info that metals has, for example what it considers to be sources for each module. There should be one for js, jvm and native if enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs more information Use if we need more information for a specific ticket
Projects
None yet
Development

No branches or pull requests

2 participants