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

Syntax highlighting for REPL using ammonite as base instead of JLine #1233

Merged
merged 13 commits into from May 10, 2016

Conversation

@felixmulder
Copy link
Member

@felixmulder felixmulder commented Apr 22, 2016

One was implemented by hand and the other by using dotty's scanner. The one
built by hand is ~short, and behaves correctly.

The scanner one is unfortunately not ready for testing - there are too
many things that are workarounds for it to be a good solution as of now

The code added from Ammonite is licensed under MIT, not sure where to
put the license - but will add it once I know.

@felixmulder felixmulder force-pushed the felixmulder:topic/repl-syntax-highlighting branch 5 times, most recently from 145c447 to e7cc691 Apr 22, 2016
@felixmulder felixmulder changed the title [WIP] Syntax highlighting for REPL using ammonite as base instead of JLine Syntax highlighting for REPL using ammonite as base instead of JLine Apr 27, 2016
@felixmulder felixmulder force-pushed the felixmulder:topic/repl-syntax-highlighting branch 3 times, most recently from bf5f854 to 4618297 Apr 27, 2016
@felixmulder
Copy link
Member Author

@felixmulder felixmulder commented Apr 27, 2016

Once #1238 is merged I believe this will compile under dotty.

Side note: running only one test in the tests.scala file: sbt test:test-only dotc.tests -- *repl_all*

felixmulder added 10 commits Apr 22, 2016
One was implemted by hand and the other by using dotty's parser. The one
built by hand is shorter, and behaves correctly.

The scanner one is unfortunately not ready for testing - there are too
many things that are workarounds for it to be a good solution as of now

The code added from Ammonite is licensed under MIT, not sure where to
put the license - but will add it once I know.
Since we decided to go with the non dotty-scanner approach these are
unnecessary to have altered, might just as well revert them.
Launching the repl with: `runMain dotty.tools.dotc.repl.Main` is now
working correctly
@felixmulder felixmulder force-pushed the felixmulder:topic/repl-syntax-highlighting branch from 45d207a to 3515901 Apr 28, 2016
@odersky
Copy link
Contributor

@odersky odersky commented Apr 28, 2016

@felixmulder You can rebase and try again. #1238 is merged.

@felixmulder felixmulder force-pushed the felixmulder:topic/repl-syntax-highlighting branch from 8fb9c11 to f02cfda Apr 29, 2016
@felixmulder felixmulder force-pushed the felixmulder:topic/repl-syntax-highlighting branch from f02cfda to 29fc55a Apr 29, 2016
When enter pressed immediately after keyword, the highlighting would be
aborted
@felixmulder
Copy link
Member Author

@felixmulder felixmulder commented Apr 29, 2016

@odersky: there was a test that compiled dotty with -Ycheck-reentrant. This failed because some immutable structures (with internal mutable state) where not marked @sharable. So now everything seems to be working fine and this is ready for review.

@DarkDimius
Copy link
Member

@DarkDimius DarkDimius commented May 8, 2016

@odersky, it would be nice to get this in before ScalaDays.

@odersky
Copy link
Contributor

@odersky odersky commented May 8, 2016

LGTM, thanks!

@DarkDimius DarkDimius merged commit 134ad7a into lampepfl:master May 10, 2016
4 checks passed
4 checks passed
@dotty-bot
validate-junit [1398] SUCCESS. Took 18 min.
Details
@dotty-bot
validate-main [1411] SUCCESS. Took 25 min.
Details
@dotty-bot
validate-partest [1400] SUCCESS. Took 15 min.
Details
@dotty-bot
validate-partest-bootstrapped [492] SUCCESS. Took 25 min.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants