8000 Improve diagnostic error on failed genLoadIdent by retronym · Pull Request #4397 · scala/scala · GitHub
[go: up one dir, main page]

Skip to content

Improve diagnostic error on failed genLoadIdent #4397

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 1 commit into from
Mar 24, 2015

Conversation

retronym
Copy link
Member

This error has been haunting us recently, firstly on Greg's machine
when compiling the compiler using the new SBT build, and more recently
during PR validation in #4316.

This commit will output an error like:

symbol value c#16812 does not exist in Macro.impl, which contains locals value a#16810, value b#16811

I've included symbol IDs in the hope that they will prove useful.

It seems that synthetic identifiers generated by the pattern matcher
are often seen in the vicinity of this bug.

Review by the haunted: @gkossakowski / @som-snytt

This error has been haunting us recently, firstly on Greg's machine
when compiling the compiler using the new SBT build, and more recently
during PR validation in scala#4316.

This commit will output an error like:

  symbol value c#16812 does not exist in Macro.impl, which contains locals value a#16810, value b#16811

I've included symbol IDs in the hope that they will prove useful.

It seems that synthetic identifiers generated by the pattern matcher
are often seen in the vicinity of this bug.
case ex: MatchError =>
abort("symbol " + sym + " does not exist in " + ctx.method)
ctx.method.lookupLocal(sym) match {
case Some(l) =>
Copy link
Contributor

Choose a reason for hiding this comment

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

It sure would be nice if that didn't look like a one. It's too bad I sound so ungrateful when I say that. I bet we could make good use of the Turkish undotted i.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree one letter identifier is not ideal but it's been like that before.

@retronym
Copy link
Member Author

/rebuild

https://scala-ci.typesafe.com/job/scala-2.11.x-integrate-ide/519/console

ide.sdt.debug.tests/target/classes at 1427197565681
Build timed out (after 76 minutes). Marking the build as aborted.
Build was aborted
8000

@gkossakowski
Copy link
Contributor

LGTM

Thanks for submitting this patch!

gkossakowski added a commit that referenced this pull request Mar 24, 2015
Improve diagnostic error on failed genLoadIdent
@gkossakowski gkossakowski merged commit de4edd4 into scala:2.11.x Mar 24, 2015
retronym added a commit to retronym/scala that referenced this pull request Apr 7, 2015
We have seen an intermittent crasher in the backend for the last
month or so.

In scala#4397, I added a diagnostic
to show the actual locals in scope in the method.

This commit further expands the diagnistic to show the method's tree.
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
0