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 Test Explorer or Run/Debug Code Lens on Cross Project #4782

Closed
valencik opened this issue Dec 29, 2022 · 4 comments
Closed

No Test Explorer or Run/Debug Code Lens on Cross Project #4782

valencik opened this issue Dec 29, 2022 · 4 comments
Labels
bug Something that is making a piece of functionality unusable
Milestone

Comments

@valencik
Copy link

Describe the bug

  1. Run sbt new typelevel/typelevel.g8 and accept all the defaults.
  2. Open the newly created project in VSCode with Metals, note no tests found:
    image

If we change the build in build.sbt from

lazy val core = crossProject(JVMPlatform, JSPlatform)
  .crossType(CrossType.Pure)
  .in(file("core"))
  //...

to

lazy val core = project
  .in(file("core"))

and let Metals reimport/reindex the build, we get tests and code lens:

image

Expected behavior

Test explorer and Code lens should show up and work as normal with crosscompiled projects

Operating system

Linux

Editor/Extension

VS Code

Version of Metals

v0.11.9

Extra context or search terms

No response

@tgodzik tgodzik added this to To do in Metals Issue Board Dec 29, 2022
@tgodzik tgodzik added the bug Something that is making a piece of functionality unusable label Feb 16, 2023
@kasiaMarek
Copy link
Contributor

kasiaMarek commented Jul 4, 2023

This seems to be on bloop. Metals sends buildTarget/scalaTestClasses to collect information about tests but bloop just doesn't reply. That also means that if you had some tests discovered before e.g. by sbt it won't get updated.

@tgodzik
Copy link
Contributor

tgodzik commented Jul 6, 2023

Looks like part of the problem was scalacenter/bloop#2104 and at least the compilation would work. Can be tested with Bloop 1.5.8-4-b8701857-SNAPSHOT <- main problem was that typelevel projects seem to have more options, which caused the bug in Bloop to show.

@tgodzik
Copy link
Contributor

tgodzik commented Jul 7, 2023

And it seems the other issue is scalacenter/bloop#2107

The node_modules directory was missing and I am not sure why and how it's setup in the project, since we need node_modules for sure.

@kasiaMarek
Copy link
Contributor

Fixed on bloop side.

Metals Issue Board automation moved this from To do to Done Sep 4, 2023
@kasiaMarek kasiaMarek added this to the Metals v1.1.0 milestone Oct 17, 2023
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
Projects
Archived in project
Development

No branches or pull requests

3 participants