Skip to content

Prepare REPL for dotty-bridge #1299

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

Merged
merged 3 commits into from
Jun 3, 2016

Conversation

felixmulder
Copy link
Contributor

@felixmulder felixmulder commented Jun 2, 2016

This PR is preparing the REPL for #1293 being completed

  • Add initial commands
  • Add cleanup commands
  • Add value binding functionality

@felixmulder felixmulder changed the title [WIP] Add initialCommands and cleanupCommands to REPL [WIP] Prepare REPL for dotty-bridge Jun 2, 2016
@felixmulder felixmulder self-assigned this Jun 2, 2016
@felixmulder felixmulder force-pushed the topic/prepare-repl-for-bridge branch from 393ebe1 to 3e7c144 Compare June 2, 2016 18:21
@felixmulder felixmulder changed the title [WIP] Prepare REPL for dotty-bridge Prepare REPL for dotty-bridge Jun 2, 2016
@felixmulder felixmulder force-pushed the topic/prepare-repl-for-bridge branch from 3e7c144 to 05d4322 Compare June 2, 2016 18:22
* field `value`. The value is then set via Java reflection.
*
* Example: We want to bind a value `List(1,2,3)` to identifier `list` from
* SBT. The bind method accomplishes this by creating the following:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's called sbt, not SBT ;)

@felixmulder felixmulder force-pushed the topic/prepare-repl-for-bridge branch from 05d4322 to 11b5a2a Compare June 2, 2016 18:29
@@ -65,6 +65,9 @@ object REPL {
*/
val cleanupCommands: List[String] = Nil

/** We also allow binding initial values */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description should not start with "We also allow ..." but just explains what bound values are and maybe give an example.

@felixmulder felixmulder force-pushed the topic/prepare-repl-for-bridge branch 2 times, most recently from fd5a5c6 to 7e1cdbf Compare June 2, 2016 18:32
@felixmulder
Copy link
Contributor Author

@smarter: fixed your feedback 👍

method.invoke(resObj, value) == null
}
} catch {
case _: Throwable =>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import scala.util.control.NonFatal then case NonFatal(_) => instead?

@smarter
Copy link
Member

smarter commented Jun 2, 2016

Otherwise LGTM

@smarter
Copy link
Member

smarter commented Jun 2, 2016

LGTM needs to be at the beginning of the line otherwise dotty-bot is unhappy :)

@felixmulder felixmulder force-pushed the topic/prepare-repl-for-bridge branch from 514feca to 5c29e0a Compare June 3, 2016 07:23
@DarkDimius
Copy link
Contributor

LGTM

@DarkDimius DarkDimius merged commit 030ff82 into scala:master Jun 3, 2016
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

Successfully merging this pull request may close these issues.

4 participants