Skip to content

improvement: Resolve console REPL artifacts via coursier API instead of the CLI#1

Open
jozanek wants to merge 1 commit into
fix/1226-ammonite-consolefrom
improvement/console-programmatic-resolution
Open

improvement: Resolve console REPL artifacts via coursier API instead of the CLI#1
jozanek wants to merge 1 commit into
fix/1226-ammonite-consolefrom
improvement/console-programmatic-resolution

Conversation

@jozanek
Copy link
Copy Markdown
Owner

@jozanek jozanek commented Jun 6, 2026

Stacked on fix/1226-ammonite-console (upstream PR scalacenter#2941); review shows just the single follow-up commit.

bloop console shelled out to a coursier/cs launcher on the client's PATH and requested ammonite_<exactScalaVersion>:latest.release. So it failed with a bare "command not found" when no launcher was present, and with a raw coursier stack trace when Ammonite wasn't published for the project's exact Scala version.

This resolves the REPL artifacts with bloop's existing coursier API (DependencyResolution) and emits a plain java -cp ... <main> command instead:

  • no dependency on an external coursier launcher (only java is needed);
  • resolution failures surface as a clear, actionable message;
  • also fixes a latent bug where the Scala-version fallback for Java-only projects produced a garbage artifact coordinate.

Applies to both the Ammonite and Scala REPLs. ConsoleSpec now launches the generated command end-to-end and asserts the project's classes are visible in the REPL.

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