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 environment variable help under --envs-help & refactor environment variable usage #3055

Merged
merged 5 commits into from
Aug 1, 2024

Conversation

Gedochao
Copy link
Contributor

@Gedochao Gedochao commented Jul 29, 2024

Changes are as follows:

  • refactors the code to have all environment variables we use listed as constants in one spot (which makes it easier to track)
    • this doesn't include all of the envs used by our dependencies, like Bloop or Coursier, so it's not meant to be truly exhaustive from the user's perspectvie;
  • limits environment variables saved for bsp in setup-ide to only those that are necessary;
  • adds environment variable dedicated help under --envs-help, which lists all of the envs we use with short descriptions:
scala-cli --env-help --power
# The following is the list of environment variables used and recognized by Scala CLI.
# It should by no means be treated as an exhaustive list
# Some tools and libraries Scala CLI integrates with may have their own, which may or may not be listed here.
# 
# Scala CLI
#   SCALA_CLI_CONFIG              Scala CLI configuration file path
#   SCALA_CLI_HOME                Scala CLI home directory
#   SCALA_CLI_INTERACTIVE         Interactive mode toggle
#   SCALA_CLI_INTERACTIVE_INPUTS  Interactive mode inputs
#   SCALA_CLI_POWER               Power mode toggle
#   SCALA_CLI_PRINT_STACK_TRACES  Print stack traces toggle
#   SCALA_CLI_SODIUM_JNI_ALLOW    Allow to load libsodiumjni
#   SCALA_CLI_VENDORED_ZIS        Toggle io.github.scala_cli.zip.ZipInputStream
# 
# Java
#   JAVA_HOME                     Java installation directory
#   JAVA_OPTS                     Java options
#   JDK_JAVA_OPTIONS              JDK Java options
# 
# Coursier
#   COURSIER_CACHE                Coursier cache location
#   COURSIER_MODE                 Coursier mode (can be set to 'offline')
# 
# Spark
#   SPARK_HOME                    (power) Spark installation directory
# 
# Miscellaneous
#   PATH                          The app path variable
#   DYLD_LIBRARY_PATH             Runtime library paths on Mac OS X
#   LD_LIBRARY_PATH               Runtime library paths on Linux
#   PATHEXT                       Executable file extensions on Windows
#   SHELL                         The currently used shell
#   VCVARSALL                     Visual C++ Redistributable Runtimes
#   ZDOTDIR                       Zsh configuration directory
# 
# Internal
#   CI                            (power) Marker for running on the CI

@Gedochao Gedochao force-pushed the maintenance/envs-refactor branch 2 times, most recently from 382ea9b to 61cb818 Compare July 30, 2024 11:32
@Gedochao Gedochao changed the title [WIP] Refactor environment variable usage Add environment variable help under --envs-help & refactor environment variable usage Jul 31, 2024
@Gedochao Gedochao marked this pull request as ready for review July 31, 2024 07:39
@Gedochao Gedochao closed this Jul 31, 2024
@Gedochao Gedochao reopened this Jul 31, 2024
@Gedochao Gedochao enabled auto-merge August 1, 2024 12:44
@Gedochao Gedochao merged commit 9061f30 into VirtusLab:main Aug 1, 2024
76 of 78 checks passed
@Gedochao Gedochao deleted the maintenance/envs-refactor branch August 2, 2024 07:13
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