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

Downgrading default Scala version to match Ammonite is wrong with using directives #3467

Open
Gedochao opened this issue Jan 29, 2025 · 0 comments
Labels
Ammonite bug Something isn't working

Comments

@Gedochao
Copy link
Contributor

Version(s)
1.6.1

Describe the bug
When the default Scala version is not yet supported by the default Ammonite version, we automatically downgrade to a hardcoded version.
This, however, only works if the Scala version is passed to the REPL via a command line option.
Whatever is defined in a using directive gets ignored at the moment.

To Reproduce

scala-cli repl --amm --scala-snippet '//> using scala 3.3.4' --power
# Scala 3.6.3 is not yet supported with this version of Ammonite
# Defaulting to Scala 3.5.1
# Scala 3.6.3 is not yet supported with this version of Ammonite
# Defaulting to Scala 3.5.1
# Compiling project (Scala 3.5.1, JVM (23))
# Compiled project (Scala 3.5.1, JVM (23))
# Loading...
# Welcome to the Ammonite Repl 3.0.0-2-6342755f (Scala 3.5.1 Java 23.0.1)
# @  

Expected behaviour
Ammonite REPL should respect Scala version from using directives.

@Gedochao Gedochao added Ammonite bug Something isn't working labels Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ammonite bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant