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

Use scala-debug-adapter 3.0 #1841

Merged
merged 1 commit into from
Oct 24, 2022
Merged

Conversation

adpi2
Copy link
Member

@adpi2 adpi2 commented Oct 21, 2022

This new major version of the scala-debug-adapter brings a number of new features including:

  • Step filtering for Scala 2 and Scala 3
  • Better expression evaluation for Scala 3
  • Configuration of the ScalacOptions of the expression compiler
  • Show returned value of method call
  • Log-points
  • Conditional breakpoints
  • Restart top frame of the call stack
  • Filtering of class loading

To learn more about those new features you can refer to the release notes

@adpi2
Copy link
Member Author

adpi2 commented Oct 21, 2022

The tests do not pass because the new step filter does not like when a class is defined in the <empty> package. I need to do another release of the scala-debug-adapter to fix that.

@adpi2 adpi2 force-pushed the scala-debug-adapter-3 branch from 82e4648 to f67c3e4 Compare October 21, 2022 13:39
@adpi2
Copy link
Member Author

adpi2 commented Oct 21, 2022

Ready to be reviewed. There is one test that failed but it seems totally unrelated.

@adpi2 adpi2 requested a review from tgodzik October 21, 2022 15:33
Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow! That's a lot of amazing features! That's super exciting. One comment from me.

getOrTryUpdate(stepFilterCache, scalaVersion) {
val stepFilterModule = s"${BuildInfo.scala3StepFilterName}_${scalaVersion.binaryVersion}"
val stepFilter = Artifact(BuildInfo.organization, stepFilterModule, BuildInfo.version)
val tastyCore = Artifact("org.scala-lang", "tasty-core_3", scalaVersion.value)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need scala 3 artifacts on the classpath. Do we need it even with Scala 2?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only need to load the step filter for Scala 3.

The Scala 2 step filter is a direct dependency of the scala-debug-adapter so it does not need to be class loaded in its own class loader.

Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@tgodzik tgodzik merged commit 7cb4327 into scalacenter:main Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants