Skip to content

Conversation

@lihaoyi
Copy link
Contributor

@lihaoyi lihaoyi commented Nov 15, 2025

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 <[email protected]>
@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
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
Copy link
Contributor Author

lihaoyi commented Nov 16, 2025

@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
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
Copy link
Contributor Author

lihaoyi commented Nov 16, 2025

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

@Gedochao
Copy link
Contributor

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

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