Skip to content

Conversation

@arnavsharma990
Copy link
Contributor

Fixes #2235

This change includes Provided dependencies in the runtime classpath when
exporting sbt builds to bloop.
This fixes bloop run and local debugging behavior by aligning runtime execution
with JVM semantics.

A new scripted test verifies that a Provided dependency is available at runtime.

Copilot AI review requested due to automatic review settings January 6, 2026 10:02
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes issue #2235 by including Provided dependencies in the runtime classpath when exporting sbt builds to bloop, aligning runtime execution behavior with JVM semantics.

  • Modified emulateRuntimeDependencyClasspath to include dependencies with Provided scope
  • Added a new scripted test to verify Provided dependencies are available at runtime
  • Used .distinct to handle potential duplicate entries in the classpath

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
integrations/sbt-bloop/src/main/scala/bloop/integrations/sbt/SbtBloop.scala Modified emulateRuntimeDependencyClasspath to fetch and include Provided scope dependencies in the runtime classpath, with deduplication
integrations/sbt-bloop/src/sbt-test/sbt-bloop/provided-runtime-classpath/build.sbt Test configuration that defines a project with a Provided dependency and assertions to verify it appears in both compile and runtime classpaths
integrations/sbt-bloop/src/sbt-test/sbt-bloop/provided-runtime-classpath/project/plugins.sbt Configures the sbt-bloop plugin for the test project
integrations/sbt-bloop/src/sbt-test/sbt-bloop/provided-runtime-classpath/test Scripted test script that runs bloopGenerate and checkBloopFiles tasks

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the project is not building. Could you take a look?

@arnavsharma990
Copy link
Contributor Author

@tgodzik I wasn’t able to reliably run scripted locally in Codespaces due to sbt session initialization issues, but the change is minimal and scoped. CI should give a clean signal — happy to iterate based on CI failures if any.

Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, LGTM!

@tgodzik tgodzik merged commit a4ebb98 into scalacenter:main Jan 13, 2026
13 checks passed
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.

Include provided dependency in runtime classpath

2 participants