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
REPL: Compilatation failed "Main.scala:11: Internal is renamed twice" #352
Comments
@Flowdalic can you provide standalone repro steps I can use? I haven no idea what gradle is or what miniDNS is, but this looks like it should be fixable |
See mentioned commit. Steps to reproduce git clone https://github.com/Flowdalic/minidns.git
cd minidns
git checkout -b repl
./repl |
I'm getting
Do I need an Android SDK set up to make this fail? |
Could you throw together a repro that doesn't require android? Ideally I'd want something I can run on OpenJDK. I don't see anything about this failure which would be specific to Android |
The problem is that when someone imports 'repl' object everything fails: |
Yeah but i have no clue what the |
No-no, just create object repl in ammonite, and then it throws compilation error. |
Oh that's a good find haoyi-mbp:~ haoyi$ ~/amm
Loading...
Welcome to the Ammonite Repl 0.5.5
(Scala 2.11.7 Java 1.8.0_25)
haoyi-haoyi@ 1
res0: Int = 1
haoyi-haoyi@ object repl
defined object repl
haoyi-haoyi@ 1
Main.scala:11: Internal is renamed twice
import ammonite.repl.frontend.ReplBridge.repl.{
^
Compilation Failed |
@PanAeon as a workaround could you import your |
Well, it's not mine) It's Flowdalic's) |
s/de.measite.minidns.repl/de.measite.minidns.minidnsrepl/ fixed the issue for me (not sure if you want/can fix it in Ammonite). Thank you. :) |
It comes with working tab completion. \o/ Was necessary to s/de.measite.minidns.repl/de.measite.minidns.minidnsrepl/ because of com-lihaoyi/Ammonite#352.
Here's a tighter minimization of the issue: @ object Foo{
val bar = 1
}
defined object Foo
@ import Foo.bar
import Foo.bar
@ import Foo.{bar => _}
import Foo.{bar => _}
@ bar
Main.scala:41: bar is renamed twice
import cmd0.Foo.{
^
Compilation Failed |
I'm trying to add a REPL to my Java projects build with gradle (same as #237). At first I was using the Scala REPL which worked but didn't had tab completion support. Now I was pointed to Ammonite, which I configured.
At first I was very happy, because tab completion now works, but unfortunately, when trying to invoke a method, the compilation fails:
The text was updated successfully, but these errors were encountered: