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

-Yno-imports #40

Closed
paulp opened this issue Mar 11, 2015 · 2 comments
Closed

-Yno-imports #40

paulp opened this issue Mar 11, 2015 · 2 comments

Comments

@paulp
Copy link

paulp commented Mar 11, 2015

Here's what the scala repl does if you start it with -Yno-imports:

scala -Yno-imports
Welcome to Scala version 2.11.5 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_40).
Type in expressions to have them evaluated.
Type :help for more information.

scala> <console>:6: error: not found: type Any
  def set(x: Any) = value = x.asInstanceOf[scala.tools.nsc.interpreter.IMain]
             ^

It flounders even harder in sbt. There's no way to fix it without hacking the repl.

This leaves me with hundreds and hundreds of identifiers in scope in the psp-std repl which I don't want.

If you can get me to a repl where I only have my own identifiers I would undoubtedly abandon the scala repl. It would be a start to expose Settings somehow, as right now I see no way at it. If you're advertising "null" as the argument to main clearly you're not getting a lot of mileage out of the arguments. How about

ammonite.repl.Repl.main(Array("-Yno-predef", "-Yno-imports"))

Speaking of too many identifiers,

Loading Ammonite Repl...
@ <tab> Display all 678 possibilities? (y or n)

Does that really seem like an improvement to you? There's a reason the scala repl doesn't blast every identifier it has ever seen at you in response to a tab. But it's especially bad for me, because in my source base none of those 678 offerings should be in scope except the tiny subset which I have aliased into one of my packages.

@lihaoyi
Copy link
Member

lihaoyi commented Mar 11, 2015

yeah seems reasonable.

@lihaoyi
Copy link
Member

lihaoyi commented Aug 16, 2015

Closing in deference to #40

@lihaoyi lihaoyi closed this as completed Aug 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants