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 a deprecation warning for using Scala 2.12.4 with Bloop #3470

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

Gedochao
Copy link
Contributor

@Gedochao Gedochao commented Jan 30, 2025

Closes #1382
Adds a deprecation warning for when Scala 2.12.4 is used with Bloop (which can be suppressed as any other deprecation warning), as per #1382 (comment)

scala-cli -e 'println("Hello")' -S 2.12.4 --jvm 8
# [warn] Scala 2.12.4 has been deprecated for use with Bloop.
# [warn] It may lead to infinite compilation.
# [warn] To disable the build server, pass --server=false.
# [warn] Refer to https://github.com/VirtusLab/scala-cli/issues/1382 and https://github.com/sbt/zinc/issues/1010
# Compiling project (Scala 2.12.4, JVM (8))
# Non-compiled module 'compiler-bridge_2.12' for Scala 2.12.4. Compiling...
# Error compiling project (Scala 2.12.4, JVM (8))
# Compilation failed 

scala-cli -e 'println("Hello")' -S 2.12.4 --jvm 8 --server=false
# Hello

scala-cli -e 'println("Hello")' -S 2.12.4 --jvm 8 --suppress-deprecated-warning
# Compiling project (Scala 2.12.4, JVM (8))
# Non-compiled module 'compiler-bridge_2.12' for Scala 2.12.4. Compiling...
# Error compiling project (Scala 2.12.4, JVM (8))
# Compilation failed

@Gedochao Gedochao force-pushed the maintenance/scala-2.12.4-warn branch from 2e48885 to ec06e1a Compare January 30, 2025 12:06
Copy link
Member

@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.

Is the issue connected to the sbt bridge? I think I've seen it trying to compile with newer JDK in sbt also.

@Gedochao
Copy link
Contributor Author

Is the issue connected to the sbt bridge? I think I've seen it trying to compile with newer JDK in sbt also.

@tgodzik The SBT bridge should compile, truth be told...
Even if the compiler bridge succeeded, the compilation would then hang on Zinc, and that won't be fixed:

2.12.4 also does work with --server=false, if someone is truly desperate for this to work.

@Gedochao Gedochao enabled auto-merge (squash) January 31, 2025 09:44
@Gedochao Gedochao merged commit a8db59b into VirtusLab:main Jan 31, 2025
79 checks passed
@Gedochao Gedochao deleted the maintenance/scala-2.12.4-warn branch January 31, 2025 10:27
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.

Infinite compilation with Scala 2.12.4
2 participants