Skip to content

Fix compile probe misreporting flow failures as pin incompatibility - #302

Open
adamw wants to merge 2 commits into
masterfrom
fix-pin-check-java-prop
Open

adamw wants to merge 2 commits into
masterfrom
fix-pin-check-java-prop

Conversation

@adamw

@adamw adamw commented Oct 22, 2026

Copy link
Copy Markdown
Member

Problem: when a flow failed with an ordinary error (exit 1–127), the shell said "This flow pins an orca version incompatible with the shell … re-run with --honor-pin" (interactive mode offered a pinned re-run instead).

Why: after a failure, the shell runs scala-cli compile to check whether the flow compiles. That command passed --java-prop, which scala-cli compile doesn't accept. So the check always failed, and every failure looked like a version problem.

Fix: don't pass --java-prop to scala-cli compile. It's only needed at run time.

Tests:

  • New CompileProbeTest runs the real compile command through scala-cli. It fails before the fix ("Unrecognized argument: --java-prop") and passes after. It's added to the CI flow-scripts job.
  • Removed the unit test that checked for the bad flag.
  • Live: a flow that exits 1 now shows flow fail.sc finished (exit 1), with no pin message. Shell 0.2.1 shows the pin message.
  • testFull, scalafmtCheckAll, zero warnings.

🤖 Generated with Claude Code

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.

1 participant