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

Add native Dotty REPL #2991

Merged
merged 90 commits into from Aug 23, 2017

Conversation

Projects
None yet
3 participants
@felixmulder
Contributor

felixmulder commented Aug 17, 2017

Adding this here to check using CI that all is well in the world so far.

Will probably be ready for review in a day or two.

@OlivierBlanvillain OlivierBlanvillain self-requested a review Aug 23, 2017

@OlivierBlanvillain OlivierBlanvillain self-assigned this Aug 23, 2017

@OlivierBlanvillain

This comment has been minimized.

Show comment
Hide comment
@OlivierBlanvillain

OlivierBlanvillain Aug 23, 2017

Contributor

#1440 and #2554 are fixed in the new repl, we should close these and delete the area:old-repl label after merge :)

Contributor

OlivierBlanvillain commented Aug 23, 2017

#1440 and #2554 are fixed in the new repl, we should close these and delete the area:old-repl label after merge :)

Show outdated Hide outdated compiler/src/dotty/tools/dotc/core/StdNames.scala
@@ -197,7 +197,6 @@ class CompilationTests extends ParallelTesting {
compileDir("../compiler/src/dotty/tools/dotc/config", picklingOptions) +
compileDir("../compiler/src/dotty/tools/dotc/parsing", picklingOptions) +
compileDir("../compiler/src/dotty/tools/dotc/printing", picklingOptions) +
compileDir("../compiler/src/dotty/tools/dotc/repl", picklingOptions) +

This comment has been minimized.

@OlivierBlanvillain

OlivierBlanvillain Aug 23, 2017

Contributor

I wonder if it would make sense to keep all that code somewhere under /tests given that it helped detect some nasty pattern matching edge cases... WDYT?

@OlivierBlanvillain

OlivierBlanvillain Aug 23, 2017

Contributor

I wonder if it would make sense to keep all that code somewhere under /tests given that it helped detect some nasty pattern matching edge cases... WDYT?

This comment has been minimized.

@felixmulder

felixmulder Aug 23, 2017

Contributor

Maybe, it still has the same components, so adding this should be trivial 👍

@felixmulder

felixmulder Aug 23, 2017

Contributor

Maybe, it still has the same components, so adding this should be trivial 👍

`dotty-compiler`,
`dotty-compiler` % "test->test"
).
settings(commonNonBootstrappedSettings).

This comment has been minimized.

@OlivierBlanvillain

OlivierBlanvillain Aug 23, 2017

Contributor

I thought we the repl would be both complied by scala and bootstrapped?

@OlivierBlanvillain

OlivierBlanvillain Aug 23, 2017

Contributor

I thought we the repl would be both complied by scala and bootstrapped?

This comment has been minimized.

@OlivierBlanvillain

OlivierBlanvillain Aug 23, 2017

Contributor

Oh I guess adding the sources in dottyCompilerSettings does the trick...

@OlivierBlanvillain

OlivierBlanvillain Aug 23, 2017

Contributor

Oh I guess adding the sources in dottyCompilerSettings does the trick...

Show outdated Hide outdated repl/src/dotty/tools/repl/ParseResult.scala
Show outdated Hide outdated repl/src/dotty/tools/repl/ParseResult.scala
package repl
package terminal
/**

This comment has been minimized.

@OlivierBlanvillain

OlivierBlanvillain Aug 23, 2017

Contributor

Old school scaladoc comments?

@OlivierBlanvillain

OlivierBlanvillain Aug 23, 2017

Contributor

Old school scaladoc comments?

This comment has been minimized.

@felixmulder

felixmulder Aug 23, 2017

Contributor

ammonite strikes again!

@felixmulder

felixmulder Aug 23, 2017

Contributor

ammonite strikes again!

"val res0: Int = 2",
"var y: Int = 5")
expected === storedOutput().split("\n")

This comment has been minimized.

@OlivierBlanvillain

OlivierBlanvillain Aug 23, 2017

Contributor

What does === do with a Set and an Array oO?

@OlivierBlanvillain

OlivierBlanvillain Aug 23, 2017

Contributor

What does === do with a Set and an Array oO?

This comment has been minimized.

@felixmulder

felixmulder Aug 23, 2017

Contributor

it's a cooooool thingy that sorts, asserts and prints if assertion fails

@felixmulder

felixmulder Aug 23, 2017

Contributor

it's a cooooool thingy that sorts, asserts and prints if assertion fails

Show outdated Hide outdated repl/test/dotty/tools/repl/ScriptedTests.scala
@@ -20,6 +19,24 @@ class ConsoleInterface {
def run(args: Array[String],
bootClasspathString: String,
classpathString: String,
// TODO: initial commands needs to be run under some form of special

This comment has been minimized.

@OlivierBlanvillain

OlivierBlanvillain Aug 23, 2017

Contributor

Should we make an issue out of this?

@OlivierBlanvillain

OlivierBlanvillain Aug 23, 2017

Contributor

Should we make an issue out of this?

This comment has been minimized.

@felixmulder

felixmulder Aug 23, 2017

Contributor

There is: #3007

@felixmulder

felixmulder Aug 23, 2017

Contributor

There is: #3007

AnsiNav.resetForegroundColor
)
val autocompleteFilter: Filter = Filter.action("autocompleteFilter")(SpecialKeys.Tab :: Nil) {

This comment has been minimized.

@OlivierBlanvillain

OlivierBlanvillain Aug 23, 2017

Contributor

I think the completion behavior is a bit too aggressive, at least compared to my bash habits:

$ touch equals
$ touch equalsIgnoreCase
$ cat equ                               # Press tab
equals            equalsIgnoreCase
$ cat equals                            # Press tab again
equals            equalsIgnoreCase
$ cat equals                            # and again
equals            equalsIgnoreCase
scala> "".equ                           // Press tab
equals               equalsIgnoreCase
scala> "".equals                        // Press tab again
equalsIgnoreCase
scala> "".equalsIgnoreCase              // and again
@OlivierBlanvillain

OlivierBlanvillain Aug 23, 2017

Contributor

I think the completion behavior is a bit too aggressive, at least compared to my bash habits:

$ touch equals
$ touch equalsIgnoreCase
$ cat equ                               # Press tab
equals            equalsIgnoreCase
$ cat equals                            # Press tab again
equals            equalsIgnoreCase
$ cat equals                            # and again
equals            equalsIgnoreCase
scala> "".equ                           // Press tab
equals               equalsIgnoreCase
scala> "".equals                        // Press tab again
equalsIgnoreCase
scala> "".equalsIgnoreCase              // and again

This comment has been minimized.

@felixmulder

felixmulder Aug 23, 2017

Contributor

Maybe, but that's the way it's implemented in ammonite. We could probably enhance it so that you get a more bash-like behaviour. But IMO outside of the scope of this PR being merged :)

@felixmulder

felixmulder Aug 23, 2017

Contributor

Maybe, but that's the way it's implemented in ammonite. We could probably enhance it so that you get a more bash-like behaviour. But IMO outside of the scope of this PR being merged :)

This comment has been minimized.

@felixmulder

felixmulder Aug 23, 2017

Contributor

Low-hanging fruit perhaps?

@felixmulder

felixmulder Aug 23, 2017

Contributor

Low-hanging fruit perhaps?

@felixmulder felixmulder changed the title from [WIP] Add native Dotty REPL to Add native Dotty REPL Aug 23, 2017

@felixmulder felixmulder requested a review from OlivierBlanvillain Aug 23, 2017

@felixmulder felixmulder merged commit d70b8f4 into lampepfl:master Aug 23, 2017

1 check passed

continuous-integration/drone/pr the build was successful
Details
@rom1dep

This comment has been minimized.

Show comment
Hide comment
@rom1dep

rom1dep Aug 29, 2017

FYI, on a clean clone,

./bin/dotr
The script is going to build the required jar files
Building dotty-interfaces...done
Building dotty-compiler...done
Building dotty library...done
Building tests...done
Starting dotty REPL...
Error: Could not find or load main class dotty.tools.dotc.repl.Main

rom1dep commented Aug 29, 2017

FYI, on a clean clone,

./bin/dotr
The script is going to build the required jar files
Building dotty-interfaces...done
Building dotty-compiler...done
Building dotty library...done
Building tests...done
Starting dotty REPL...
Error: Could not find or load main class dotty.tools.dotc.repl.Main

@felixmulder

This comment has been minimized.

Show comment
Hide comment
@felixmulder
Contributor

felixmulder commented Aug 29, 2017

@allanrenucci allanrenucci deleted the dotty-staging:topic/new-repl branch Dec 14, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment