Skip to content

Backport "Support :dep ... to add library dependenceies in the Scala REPL, add helpful message to //> using dep "..."" to 3.8.0#24445

Closed
lihaoyi wants to merge 1 commit into
scala:release-3.8.0from
lihaoyi:backport-repl-dep
Closed

Backport "Support :dep ... to add library dependenceies in the Scala REPL, add helpful message to //> using dep "..."" to 3.8.0#24445
lihaoyi wants to merge 1 commit into
scala:release-3.8.0from
lihaoyi:backport-repl-dep

Conversation

@lihaoyi

@lihaoyi lihaoyi commented Nov 15, 2025

Copy link
Copy Markdown
Contributor

Backports #24131 to 3.8.0-release

…d helpful message to `//> using dep "..."` (scala#24131)

This PR is a proof-of-concept implementation porting over the Ammonite
`import $ivy` functionality to the Scala REPL, using a `:dep` syntax,
with an error message on the Scala-CLI `using dep` syntax pointing at
`:dep`. Once this lands, along with other related PRs
(scala#24127,
scala#23849) we can probably deprecate
Ammonite and refer people to the main Scala REPL since it'll have
acquired all the important features

Tested manually:

<img width="976" height="531" alt="Screenshot 2025-11-11 at 5 34 32 PM"
src="https://github.com/user-attachments/assets/740ac57a-c244-46cc-bad0-f27aa1da5716"
/>


Both `io.get-coursier:interface` and `org.virtuslab:using_directives`
are zero-dependency Java libraries, and so can be used directly without
worrying about binary compatibility. Both libraries are widely used in
the Scala ecosystem (SBT, Mill, ScalaCLI, Bazel, ...) and should be
pretty trustworthy and reliable

---------

Co-authored-by: Jamie Thompson <bishbashboshjt@gmail.com>
@lihaoyi lihaoyi changed the title Backport "Support :dep ... to add library dependenceies in the Scala REPL, add helpful message to //> using dep "..."" Backport "Support :dep ... to add library dependenceies in the Scala REPL, add helpful message to //> using dep "..."" to 3.8.0 Nov 15, 2025
@Gedochao

Copy link
Copy Markdown
Contributor

Not convinced we'd want to backport this to 3.8.0 at such a late stage... it'd be a soft no for me.
@lihaoyi generally, the flow is to label your PR as backport:nominated and leave it for the Release Officer to decide, rather than do it yourself.
Leaving the final call to @WojciechMazur.

@lihaoyi

lihaoyi commented Nov 16, 2025

Copy link
Copy Markdown
Contributor Author

@Gedochao got it, I saw the other backport PRs and just tried to follow suit. But I leave it up to you guys for the final decision. This one seems relatively non-risky since it's not in the core compiler, and is a pretty localized change

@WojciechMazur

Copy link
Copy Markdown
Contributor

Would be a nice addition, but that's a new feature to be added to already overloaded 3.8.0. Maybe keep target it for 3.8.1 and in the meantime it can be tested with nightlies. Based on the schedule 3.8.1-RC1 should be out in 4 weeks

@lihaoyi

lihaoyi commented Nov 16, 2025

Copy link
Copy Markdown
Contributor Author

@WojciechMazur sounds good, I'll just leave this here for now and will revisit once 3.8.0 final is released

@Gedochao

Copy link
Copy Markdown
Contributor

@WojciechMazur this PR can be closed, yeah? we won't be merging it to 3.8.0

@WojciechMazur WojciechMazur force-pushed the release-3.8.0 branch 2 times, most recently from bc326b2 to 29b4485 Compare December 31, 2025 18:59
@lihaoyi

lihaoyi commented Jan 23, 2026

Copy link
Copy Markdown
Contributor Author

I think this is already in 3.8.2-RC1, should we close this?

@Gedochao

Copy link
Copy Markdown
Contributor

Yup.

@Gedochao Gedochao closed this Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants