Skip to content

Conversation

WojciechMazur
Copy link
Contributor

Fixes #19650

  • Bisect script used JVM 17 by default, can be overriden using:
    scala-cli run project/scripts/bisect.scala --jvm=21 -- <bisect args>
  • Bisect runner JVM version is propagated to scala-cli verification script and sbt when building compiler
  • Skip testing commits for which compiler compilation fails


def tmpScalaCliScript(command: String, args: Seq[String]): File = tmpScript(s"""
|#!/usr/bin/env bash
|export JAVA_HOME=${sys.props("java.home")}
Copy link
Contributor

Choose a reason for hiding this comment

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

Any specific reason to override JAVA_HOME instead of passing the java version to scala-cli via --jvm option?
Also, this won't be taken into account when using a custom validation script. Is this intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I assume that user of custom validation script is an advanced user who understands not only a tested code, but also the environment in which it is being run. Especially since custom bisect script might use sbt or other build tool. We could add custom JAVA_HOME to custom scripts by populating env variables of created process, but it would require a rewrite for parts of the code. I'd try this approach and check how it behaves.

The JAVA_HOME was used instead of --jvm argument to make sure that we exactly the same JVM version. We would not be able to pass a path in --jvm argument, and extraction of --jvm argument might be difficult.

@WojciechMazur WojciechMazur merged commit 20ae563 into scala:main Apr 8, 2024
@WojciechMazur WojciechMazur deleted the fix/bisect-propagte-jvm-version branch April 8, 2024 14:19
@Kordyjan Kordyjan added this to the 3.5.0 milestone May 10, 2024
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.

Bisect script failures

3 participants