-
Notifications
You must be signed in to change notification settings - Fork 149
Open
Labels
--crossIssues tied to cross compilation/the --cross option.Issues tied to cross compilation/the --cross option.experimentalTickets tied to experimental features.Tickets tied to experimental features.missing featureSomething should have been implemented, but wasn't.Something should have been implemented, but wasn't.
Description
Is your feature request related to a problem? Please describe.
Currently, passing --cross with run cross-compiles against all configured Scala versions, but only runs the first one.
//> using scala 2.13.16 2.13.15 2.13.14
object Main extends App {
println(util.Properties.versionNumberString)
}scala-cli run . --cross --power
# The `--cross` option is experimental
# Please bear in mind that non-ideal user experience should be expected.
# If you encounter any bugs or have feedback to share, make sure to reach out to the maintenance team at https://github.com/VirtusLab/scala-cli
# Compiling project (Scala 2.13.16, JVM (23))
# Compiled project (Scala 2.13.16, JVM (23))
# Compiling project (Scala 2.13.15, JVM (23))
# Compiled project (Scala 2.13.15, JVM (23))
# Compiling project (Scala 2.13.14, JVM (23))
# Compiled project (Scala 2.13.14, JVM (23))
# 2.13.16Describe the solution you'd like
I would expect to not just cross-compile against each version, but also run each of them.
So I'd expect:
scala-cli run . --cross --power
# The `--cross` option is experimental
# Please bear in mind that non-ideal user experience should be expected.
# If you encounter any bugs or have feedback to share, make sure to reach out to the maintenance team at https://github.com/VirtusLab/scala-cli
# Compiling project (Scala 2.13.16, JVM (23))
# Compiled project (Scala 2.13.16, JVM (23))
# Compiling project (Scala 2.13.15, JVM (23))
# Compiled project (Scala 2.13.15, JVM (23))
# Compiling project (Scala 2.13.14, JVM (23))
# Compiled project (Scala 2.13.14, JVM (23))
# 2.13.16
# 2.13.15
# 2.13.14Describe alternatives you've considered
The current behaviour is counter-intuitive (and inconsistent with how test or publish behave, where they respectively test or publish against all cross-compiled versions), but if we were to skip on running each option, we should at least log an explanation on what and why, as per:
Additional context
- relevant tests added in Add tests for the current behaviour of
--cross#3589 - similar issue with the
packagecommand inpackageshould actually package each of the cross-compiled configurations with--cross#3591
Metadata
Metadata
Assignees
Labels
--crossIssues tied to cross compilation/the --cross option.Issues tied to cross compilation/the --cross option.experimentalTickets tied to experimental features.Tickets tied to experimental features.missing featureSomething should have been implemented, but wasn't.Something should have been implemented, but wasn't.