8000 improvement: Resolve console REPL artifacts via coursier API instead of the CLI by jozanek · Pull Request #1 · jozanek/bloop · GitHub
[go: up one dir, main page]

Skip to content

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

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

jozanek wants to merge 64 commits into
fix/1226-ammonite-consolefrom
improvement/console-programmatic-resolution

Conversation

@jozanek
@jozanek jozanek commented Jun 6, 2026
Copy link
Copy Markdown
Owner

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.

jozanek and others added 23 commits June 6, 2026 22:45
…-multi-jvm-config

Support multi-jvm source directories in sbt
…nsole

Add regression test for the Ammonite console on JDK > 8
…ion-env-vars

Add end-to-end BSP test for debug session environment variables
…king-dir

Run BSP targets in the project working directory
…-classic-1.5.34

build(deps): Update logback-classic from 1.5.33 to 1.5.34
…ss-2.3.13

build(deps): Update shapeless from 2.3.4 to 2.3.13
…lude-dependencies

Combine --cascade with --include-dependencies in test and clean
The sbt-bloop plugin exports the sbt meta-build (the build definition
under project/) on every load so Metals can compile it. This made sbt
startup slower and noisier than without the plugin.

- Skip the on-load export when a fingerprint of the files under project/
  is unchanged. The fingerprint is stamped in .bloop whenever bloopInstall
  exports the meta-build, so startup is fast and silent once the build
  definition is stable, while edits/additions/deletions still regenerate.
- Log the automatic export at debug level; a manual bloopInstall still
  reports as before.
- Add a bloopExportMetaBuild opt-out via the BLOOP_EXPORT_META_BUILD
  environment variable / bloop.export-meta-build system property (global,
  covers nested meta-builds) or the per-layer setting.

Adds scripted tests for change detection (edit/add/delete) and the
opt-out across nested meta-build layers.
A relative single-segment unmanaged resource (e.g. file("file1.yml"))
has a null parent, which ConfigUtil.pathsOutsideRoots dereferenced via
toAbsolutePath, crashing bloopInstall/bloopGenerate. Route both callers
through one helper that normalizes the roots and the candidate paths to
absolute before delegating, so the parent is never null and in-root
resources aren't misclassified when roots are relative. Adds a scripted
regression test for a subproject exporting a resource outside its root.
…-command

Print the about banner for `bloop --version` and `bloop version`
…esources-npe

Fix NullPointerException for relative paths in sbt unmanagedResources
Prints a per-module compile summary after the compile run completes.
Opt-in via --summary so it does not affect interactive or IDE use.

The summary shows:
- Each project's compile time (slowest first), annotated (failed) or
  (cancelled) when the compile did not succeed
- Projects blocked on a failed upstream (e.g. "b - blocked on a"),
  sourced from the dag closure so repeated failures don't drop them
- Total module compile time (sum of per-module times)
- Wall-clock duration (covers the full run, including any --incremental
  false clean step)
jozanek and others added 30 commits June 11, 2026 21:38
…ash-stacktrace

Report a crash from the compiler instead of hanging the compilation
Clean deleted the class directories but kept the persisted Zinc analysis,
so after a server restart the stale analysis was reloaded and the next
compile ran incrementally against it. Converting a package into a
top-level object of the same name then kept reporting
"<object> is already defined as package <package>" until .bloop was
removed by hand.

Delete the analysis file for every cleaned target and drop the in-memory
last successful result so clean resets incremental state the same way
removing .bloop does.
…2.12

build(deps): Update sbt, scripted-plugin, test-agent from 1.12.11 to 1.12.12
…core-7.3.9

build(deps): Update scalaz-core from 7.3.8 to 7.3.9
….3.3

build(deps): Update munit from 1.3.1 to 1.3.3
…ore-2.26.0

build(deps): Update log4j-core from 2.23.1 to 2.26.0
…lafix-0.14.7

build(deps): Update sbt-scalafix from 0.14.6 to 0.14.7
build(deps): Update jna from 5.19.0 to 5.19.1
…-summary

Add --summary flag to bloop compile
…-analysis

Fully reset incremental state on clean
chore: Update sbt 2 to final release
…a-build-export

Change-detect and quiet the automatic sbt meta-build export
…ug-flag

Add --jvm-debug flag to run and test for attaching a debugger
…rogrammatic-resolution

# Conflicts:
#	frontend/src/main/scala/bloop/engine/Interpreter.scala
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.

3 participants

0