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

Ammonite imports are available in scala SIP command. #1678

Closed
bishabosha opened this issue Dec 12, 2022 · 5 comments · Fixed by #1787
Closed

Ammonite imports are available in scala SIP command. #1678

bishabosha opened this issue Dec 12, 2022 · 5 comments · Fixed by #1787
Assignees
Labels
bug Something isn't working SIP-46 All the issues related to SIP-46 to turn Scala CLI into the official scala runner command.
Projects

Comments

@bishabosha
Copy link
Contributor

bishabosha commented Dec 12, 2022

Version(s)
0.1.18

Describe the bug
I can use ammonite imports when scala-cli is run under the SIP scala command mode

To Reproduce

import $ivy.`org.jsoup:jsoup:1.13.1`

import org.jsoup.Jsoup

@main def foo(url: String) = 
  Jsoup.connect(url).get()

compile above with scala command

Expected behaviour
no special handling for import $ivy and import $dep

@bishabosha bishabosha added the bug Something isn't working label Dec 12, 2022
@Gedochao Gedochao added the SIP-46 All the issues related to SIP-46 to turn Scala CLI into the official scala runner command. label Dec 13, 2022
@Gedochao Gedochao added this to To do in Issue Board Dec 13, 2022
@tgodzik
Copy link
Member

tgodzik commented Dec 15, 2022

Thanks for reporting! Should we drop ammonite imports altogether? It's always better to have one way of doing things. We could do 0.2.0 with that change

@julienrf
Copy link
Contributor

I agree that we should not support ammonite imports. Maybe we could have a scalafix rule that would migrate from ammonite to scala-cli?

@tgodzik
Copy link
Member

tgodzik commented Dec 16, 2022

We could have a warning plus actionable diagnostics for the 0.2.x version. What does everyone else think?

@julienrf
Copy link
Contributor

I don’t think this is useful for the scala command, but maybe that’s the simplest way for scala and scala-cli to converge?

@MaciejG604
Copy link
Contributor

After further discussion support for $ivy and $dep ammonite imports has been removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working SIP-46 All the issues related to SIP-46 to turn Scala CLI into the official scala runner command.
Projects
Development

Successfully merging a pull request may close this issue.

5 participants