Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to use scalacli's using directives in worksheets #308

Open
tgodzik opened this issue Oct 18, 2022 · 0 comments
Open

Allow to use scalacli's using directives in worksheets #308

tgodzik opened this issue Oct 18, 2022 · 0 comments

Comments

@tgodzik
Copy link
Contributor

tgodzik commented Oct 18, 2022

Is your feature request related to a problem? Please describe.

In ScalaCLI you can specify Scala version using:

//> using scala "2.13.10"

it would actually be pretty nice to add that maybe some other using directives to be available with worksheets and allow for more self contained worksheets.

Describe the solution you'd like

Worksheets allowing for at least some basic using directives:

//> using scala "2.13.10"
//> using lib "org.example:example:0.10.0"
//> using repository "jitpack"
//> using options "-Xasync", "-Xfatal-warnings"

Aside from specifying scala versions, it's already possible to change the other options within worksheets using magic imports.

Describe alternatives you've considered

For most of the other options you can use magic imports:

import $ivy.`org.example:example:0.10.0`
 import $repo.`https://jitpack.io`
import $scalac.`-Xasync`
import $scalac.`-Xfatal-warnings`

for Scala version, you can change fallback scala version to the one you want or just put it within sources that use a specific scala version.

Additional context

https://scala-cli.virtuslab.org/docs/reference/directives

Search terms

scalacli using worksheets

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

No branches or pull requests

1 participant