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

Error messages leak semicolons #439

Closed
lihaoyi opened this Issue Aug 18, 2016 · 0 comments

Comments

Projects
None yet
1 participant
@lihaoyi
Copy link
Owner

lihaoyi commented Aug 18, 2016

Currently, given this script

println("bazz")
rintln("foooo")
println("bar")

We get awkward semi-colons that appear at the start of the error message:

haoyi-mbp:~ haoyi$ amm Foo.sc
Foo.sc:2: not found: value rintln
;val res_1 = rintln("foooo")
             ^
Compilation Failed

This is probably an artifact of the way we preprocess the scripts in order to add the val res prefixes and stuff; we should be able to do it without adding these awkward semi-colons.

@lihaoyi lihaoyi added the enhancement label Aug 18, 2016

lihaoyi pushed a commit that referenced this issue Aug 28, 2016

Li Haoyi

lihaoyi pushed a commit that referenced this issue Aug 29, 2016

Li Haoyi
improve error messages by removing the semicolons we were adding to j…
…oin statements, since they're no longer necessary. Fixes #439

lihaoyi pushed a commit that referenced this issue Aug 29, 2016

Li Haoyi
- Improve error messages by removing the semicolons we were adding to…
… join statements, since they're no longer necessary. Fixes #439

- Also fix the ImportSplitter parser that ImportHooks use, which was incorrectly marking the end location of trailing magic imports, creating incorrect preprocessed Scala code that relied on the synthetic semicolons in order to compile and run. This should also improve the accuracy of error-reporting in these cases

@lihaoyi lihaoyi closed this in 8c3248e Aug 29, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.