Skip to content

feat(repl): add resource directives and a :resource command - #27073

Merged
SolalPirelli merged 1 commit into
scala:mainfrom
warcholjakub:feat/26768/resource-directive
Sep 15, 2026
Merged

SolalPirelli merged 1 commit into
scala:mainfrom
warcholjakub:feat/26768/resource-directive

Conversation

@warcholjakub

@warcholjakub warcholjakub commented Sep 14, 2026 •

Copy link
Copy Markdown
Member

Fixes #26768

As per the title

Welcome to Scala 3.10.1-RC1-bin-SNAPSHOT-nonbootstrapped-git-f369d9b (25.0.1, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
                                                                                                                                                                                                
scala> //> using resourceDir /Users/jwarchol/repl-resources/conf
Added '/Users/jwarchol/repl-resources/conf' to classpath.
                                                                                                                                                                                                
scala> val greeting = scala.io.Source.fromResource("greeting.txt").mkString
val greeting: String = "hello from conf"

Have you relied on LLM-based tools in this contribution?

Yes, and I checked the output by verifying the code, and testing manually with bin/replQ.

How was the solution tested?

New automated tests (including the issue's reproducer, if applicable)

@Gedochao Gedochao left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@SolalPirelli
SolalPirelli merged commit d2c17b7 into scala:main Sep 15, 2026
64 checks passed
@warcholjakub
warcholjakub deleted the feat/26768/resource-directive branch September 16, 2026 08:56
@WojciechMazur WojciechMazur added this to the 3.10.1 milestone Oct 11, 2026
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.

REPL: add support for //> using resourceDir directive / :resourcedir command

4 participants