Ensure scala-cli.sh logs to stderr#4301
Open
alexarchambault wants to merge 4 commits into
Open
Conversation
So that this doesn't polute the output of a scala-cli command, if users pipe it to a file or another command for example
Verify the launcher's own messages (e.g. "Downloading ...") go to stderr rather than stdout, so that only the dummy app's output ends up on stdout - both on a cold cache (when the launcher gets downloaded) and on a warm one. The script path is passed in from the build via forkEnv, and COURSIER_CACHE is pointed at a fresh per-test directory. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This comment was marked as outdated.
This comment was marked as outdated.
Contributor
Author
|
(Seems the CI error aren't related to those changes, right?) |
Contributor
likely a flake, I restarted it just now |
Gedochao
reviewed
Jun 8, 2026
| expect(!hasCachedLaunchers(cache)) | ||
|
|
||
| def runLauncher(): os.CommandResult = | ||
| os.proc(launcherScript, "run", "--server=false", appRelPath).call( |
Contributor
Author
There was a problem hiding this comment.
I think that makes the test download less things (Bloop, maybe a JVM specifically for it too), that we're not interested in testing here
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This makes the
scala-cli.shscript send the messages it prints to stderr rather than stdout. These messages could be a problem if users pipe the output of a scala-cli command to a file or to another command.This also fixes an undefined command (
echoerr, which is undefined) in the script in some cases, and makes it respectCOURSIER_CACHEin the env if it's set.Checklist
scala-cli fmt .)scalafix(./mill -i __.fix)./mill -i 'generate-reference-doc[]'.run)How much have your relied on LLM-based tools in this contribution?
LLM tools were used to write a first version of the added integration tests. These have been tweaked manually after that.
How was the solution tested?
Manually + added integration tests