Backport "Support :dep ... to add library dependenceies in the Scala REPL, add helpful message to //> using dep "..."" to 3.8.0#24445
Conversation
…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>
:dep ... to add library dependenceies in the Scala REPL, add helpful message to //> using dep "..."":dep ... to add library dependenceies in the Scala REPL, add helpful message to //> using dep "..."" to 3.8.0
|
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. |
|
@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 |
|
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 |
|
@WojciechMazur sounds good, I'll just leave this here for now and will revisit once 3.8.0 final is released |
|
@WojciechMazur this PR can be closed, yeah? we won't be merging it to 3.8.0 |
01ff824 to
76644fb
Compare
bc326b2 to
29b4485
Compare
|
I think this is already in 3.8.2-RC1, should we close this? |
|
Yup. |
Backports #24131 to 3.8.0-release