Skip to content

feat(repl): support the repository directive and :repository command - #26901

Merged
warcholjakub merged 2 commits into
scala:mainfrom
warcholjakub:feat/repl/repository-directive
Aug 24, 2026
Merged

warcholjakub merged 2 commits into
scala:mainfrom
warcholjakub:feat/repl/repository-directive

Conversation

@warcholjakub

@warcholjakub warcholjakub commented Aug 24, 2026

Copy link
Copy Markdown
Member

Fixes #26750

As in the title. One minor note - it adds a limited support for aliases, because in coursier-interface there's no access to repository parser (hence, the TODO comment). When it'll become available (coursier/interface#478 - I hope soon), then I'll change that.

[test_windows_full]

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

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

How was the solution tested?

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

@SolalPirelli SolalPirelli 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.

looks good overall but worth a [test_windows_full] in the PR description to make sure we're not depending on Linux-only behavior for the test imho


@Test def `repository parses aliases, URLs, ivy patterns and local directories`: Unit =
List("central", "ivy2Local", "ivy2local", "m2Local", "m2local", "https://jitpack.io",
"file:///tmp/repo", "ivy:file:///tmp/repo/[defaultPattern]",

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.

isn't this going to fail on any OS for which the temp directory is not /tmp?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Hmm, yeah, that's fair. Haven't thought of that 🤔

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Windows tests passed

@SolalPirelli
SolalPirelli enabled auto-merge (squash) August 24, 2026 13:59
@warcholjakub
warcholjakub disabled auto-merge August 24, 2026 14:15
@warcholjakub
warcholjakub merged commit 190abc3 into scala:main Aug 24, 2026
60 checks passed
@warcholjakub
warcholjakub deleted the feat/repl/repository-directive branch August 24, 2026 14:15
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 repository directive / :repository command

3 participants