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

op1._ yields: Compiler Internal Error: Qualified names should not be present at codegen time #7582

Closed
2 tasks
sylwiabr opened this issue Aug 15, 2023 · 11 comments · Fixed by #7651 or #7657
Closed
2 tasks
Assignees
Labels

Comments

@sylwiabr
Copy link
Member

Discord username

No response

What type of issue is this?

Intermittent – Occurring irregularly

Is this issue blocking you from using Enso?

  • Yes, I can't use Enso because of this issue.

Is this a regression?

  • Yes, previous version of Enso did not have this issue.

What issue are you facing?

When parsing columns in the table on the third node with parse the compiler error occurred:
router.ts:62 [ERROR] app/gui/src/model/project/synchronized.rs:591 Execution failed in context ca4e82f0-e987-4ba2-9dce-d6f9265d37af. Error: Execution of function main failed (Compiler Internal Error: Qualified names should not be present at codegen time.)..
and the node was missing values:
Zrzut ekranu 2023-08-15 o 08 10 06
After some time it recovers and it was possible to choose the proper column from the drop-down.

Expected behaviour

The drop-down should work after appearing on the node.

How we can reproduce it?

No response

Screenshots or screencasts

No response

Logs

20230815-055256-813-enso-project-manager.log

Enso Version

nightly 15.08

Browser or standalone distribution

Standalone distribution (local project)

Browser Version or standalone distribution

standalone

Operating System

MacOS

Operating System Version

No response

Hardware you are using

No response

@sylwiabr
Copy link
Member Author

happened again when working further with the same project:
20230804-080206-882-enso-project-manager.log

@sylwiabr
Copy link
Member Author

sylwiabr commented Aug 15, 2023

https://drive.google.com/file/d/1_ocjOryj10ScC4TLq26M2-ueBxbqOdmw/view?usp=share_link @hubertp the project folder

Access Google Drive with a Google account (for personal use) or Google Workspace account (for business use).

@sylwiabr
Copy link
Member Author

Another example of the same issue, had to restart IDE
localhost-1692269582124.log
New_Project_16.zip
20230817-103106-810-enso-project-manager.log

@4e6 4e6 self-assigned this Aug 18, 2023
@JaroslavTulach
Copy link
Member

[enso] Execution of function main failed (Compiler Internal Error: Qualified names should not be present at codegen time.).
org.enso.compiler.core.CompilerError: Some(Compiler Internal Error: Qualified names should not be present at codegen time.)
  at org.enso.compiler.codegen.IrToTruffle$ExpressionProcessor.processName(IrToTruffle.scala:1535)
  at org.enso.compiler.codegen.IrToTruffle$ExpressionProcessor.org$enso$compiler$codegen$IrToTruffle$ExpressionProcessor$$run(IrToTruffle.scala:942)
  at org.enso.compiler.codegen.IrToTruffle$ExpressionProcessor.run(IrToTruffle.scala:930)
  at org.enso.compiler.codegen.IrToTruffle$ExpressionProcessor.processBlock(IrToTruffle.scala:1014)
  at org.enso.compiler.codegen.IrToTruffle$ExpressionProcessor.org$enso$compiler$codegen$IrToTruffle$ExpressionProcessor$$run(IrToTruffle.scala:938)
  at org.enso.compiler.codegen.IrToTruffle$ExpressionProcessor$BuildFunctionBody.computeBodyNode(IrToTruffle.scala:1693)
  at org.enso.compiler.codegen.IrToTruffle$ExpressionProcessor$BuildFunctionBody.bodyN$lzycompute(IrToTruffle.scala:1676)
  at org.enso.compiler.codegen.IrToTruffle$ExpressionProcessor$BuildFunctionBody.bodyN(IrToTruffle.scala:1676)
  at org.enso.compiler.codegen.IrToTruffle$ExpressionProcessor$BuildFunctionBody.bodyNode(IrToTruffle.scala:1679)
  at org.enso.compiler.codegen.IrToTruffle.$anonfun$processModule$33(IrToTruffle.scala:499)
  at org.enso.interpreter.node.MethodRootNode$LazyBodyNode.replaceItself(MethodRootNode.java:145)
  at org.enso.interpreter.node.MethodRootNode$LazyBodyNode.replaceLazyNode(MethodRootNode.java:133)

@hubertp
Copy link
Collaborator

hubertp commented Aug 18, 2023

It appears to complain about name operator2._. Easy to reproduce, just create a node by dragging from the table one.
edit: Even easier to repro: Execute repl on a program with operator2._.
I suppose this is something IDE wants to (temporarily) add but compiler shouldn't crash so bad.

@hubertp
Copy link
Collaborator

hubertp commented Aug 18, 2023

Simpler test-case:

main =
    op = 1
    op._

@JaroslavTulach JaroslavTulach changed the title When adding a node compiler error occurred Compiler Internal Error: Qualified names should not be present at codegen time. and the drop-down was missing values. op1._ yields: Compiler Internal Error: Qualified names should not be present at codegen time Aug 18, 2023
@JaroslavTulach JaroslavTulach moved this from ❓New to 📤 Backlog in Issues Board Aug 18, 2023
@JaroslavTulach JaroslavTulach self-assigned this Aug 18, 2023
@4e6 4e6 removed the triage label Aug 18, 2023
@JaroslavTulach JaroslavTulach moved this from 📤 Backlog to 👁️ Code review in Issues Board Aug 24, 2023
@JaroslavTulach
Copy link
Member

#7651 provides a safety net fix for this and other CompilerError abnormal situations. With the fix following program:

from Standard.Base import IO, Panic, Any

run op =
    IO.println op
    op._

main =
    IO.println "One"
    Panic.recover Any <| run 1
    IO.println "Two"
    Panic.recover Any <| run 2
    IO.println "Tři"
    Panic.recover Any <| run 3

outputs:

One
Two
Tři
(Error: (Compile_Error.Error 'Compiler Internal Error: Qualified names should not be present at codegen time.'))

e.g. when the run function is called, it yields which can be turned into Compile_Error with the help of Panic.recover.

@JaroslavTulach
Copy link
Member

To continue other investigations let's note that compiling following program

run op = op._
main = run

yields:

t.enso:1:5: warning: Unused function argument op.
    1 | run op = op._
      |     ^~
t.run[t.enso:1-3]

e.g. the op._ isn't treated as a usage of variable op. We should probably detect such case and treat it as a compiler error, not just a warning...

@enso-bot
Copy link

enso-bot bot commented Aug 25, 2023

Jaroslav Tulach reports a new STANDUP for yesterday (2023-08-24):

Progress: - CompilerError into Panic PR: #7651

Next Day: CI fighting

Discord
Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.
GitHub
We had a number of issues recently related to the fact that newer IDE was forced to use incompatible engine version. Examples include: #7095 #7426 and numerous discussions about the version of newl...

@github-project-automation github-project-automation bot moved this from 👁️ Code review to 🟢 Accepted in Issues Board Aug 25, 2023
@JaroslavTulach JaroslavTulach mentioned this issue Aug 25, 2023
2 tasks
@enso-bot
Copy link

enso-bot bot commented Aug 26, 2023

Jaroslav Tulach reports a new STANDUP for yesterday (2023-08-25):

Progress: - fixed by #7651

Next Day: Prepare PR for Builtins

@enso-bot
Copy link

enso-bot bot commented Aug 28, 2023

Jaroslav Tulach reports a new STANDUP for yesterday (2023-08-27):

Progress: - Fix for #7582: Compiler error for x._: #7657

Next Day: Bugfixing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants