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

Add expression evaluation for Scala 2.12 and 2.13 #1567

Merged
merged 2 commits into from
Sep 22, 2021

Conversation

adpi2
Copy link
Member

@adpi2 adpi2 commented Sep 15, 2021

Upgrade to scala 2.12.13 to be able to test expression evaluation. The tests were running with Scala 2.12.8 but expression evaluation is only available on Scala 2.12.10 or greater.

Upgrade scala-debug-adapter to 2.0.2, the debug server now needs:

  • a set of all the class path entries to be able to map the source files to the class files
  • the jvm runtime
  • the expression compiler class loader containing the expression-compiler jar and the compiler jars

Add a simple test on expression evaluation.

Warning: After merging this PR, Bloop debug session will no longer be compatible with the current version of Metals. scalameta/metals#2959 in Metals intends to fix this.

@adpi2 adpi2 requested a review from tgodzik September 15, 2021 09:27
@adpi2 adpi2 force-pushed the scala-debug-adapter-2.x branch from 828a381 to 2b4fec2 Compare September 15, 2021 12:18
@adpi2 adpi2 removed the request for review from tgodzik September 15, 2021 12:18
@adpi2 adpi2 self-assigned this Sep 15, 2021
@adpi2 adpi2 marked this pull request as draft September 15, 2021 12:19
@adpi2 adpi2 force-pushed the scala-debug-adapter-2.x branch 13 times, most recently from 0c26af4 to 7ad6b98 Compare September 17, 2021 10:44
@adpi2 adpi2 marked this pull request as ready for review September 17, 2021 14:23
project/Dependencies.scala Outdated Show resolved Hide resolved
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.

Great work @adpi2 ! I added some minor comments, but the biggest issue is the updated to newest Scala. It would probably be best to tackle it separately ass there seem to be issues with native image.

frontend/src/test/scala/bloop/dap/DebugServerSpec.scala Outdated Show resolved Hide resolved
Upgrade scala-debug-adapter to 2.0.2
For expression evaluation, the scala-debug-adapter now needs:
- a set of all the class path entries to be able to map the source files to the class files
- the jvm runtime
- the expression compiler class loader containing the expression-compiler jar and the compiler jars

Add a simple test on expression evaluation
@adpi2 adpi2 force-pushed the scala-debug-adapter-2.x branch from 7ad6b98 to a747cfa Compare September 21, 2021 11:57
@adpi2 adpi2 force-pushed the scala-debug-adapter-2.x branch from c278de9 to ec508fc Compare September 21, 2021 12:40
@adpi2
Copy link
Member Author

adpi2 commented Sep 21, 2021

@tgodzik Out of curiosity, do you know why native images are broken on 2.12.13?

@adpi2 adpi2 requested a review from tgodzik September 21, 2021 12:44
@tgodzik
Copy link
Contributor

tgodzik commented Sep 22, 2021

@tgodzik Out of curiosity, do you know why native images are broken on 2.12.13?

It's probably a part of Scala that is not supported on Native Image, there are ways around it with https://github.com/scalameta/sbt-native-image, but I haven't had time to look properly into that.

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! Great work and pretty exciting!

@tgodzik tgodzik merged commit 67e8541 into scalacenter:master Sep 22, 2021
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.

2 participants