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

Don't unnecessarily report bindings as unused variables (in IDE & REPL) #9883

Closed
radeusgd opened this issue May 7, 2024 · 4 comments · Fixed by #10705
Closed

Don't unnecessarily report bindings as unused variables (in IDE & REPL) #9883

radeusgd opened this issue May 7, 2024 · 4 comments · Fixed by #10705
Assignees
Labels

Comments

@radeusgd
Copy link
Member

radeusgd commented May 7, 2024

The repro is trivial - just declare a named binding in the REPL:

> abc = 123
[WARN] [2024-05-08T00:52:20+02:00] [enso.org.enso.compiler.Compiler] Internal_Repl_Module___:1:1: warning: Unused variable abc.
    1 | from Standard.Base import all
      | ^~~
>>> Nothing

Expected behaviour

  1. The warning should not be reported - it is expected in the REPL that the variable is not yet used.
  2. Even if it is shown - the location of the error is wrong.
@JaroslavTulach
Copy link
Member

I've heard similar complain by @jdunkerley for the IDE case. Warnings of unused operatorXYZ are reported and they quite useless as it is a common development practice to have unused values in the IDE.

Can we disable unused bindings pass when STRICT_ERRORS are false? That would fix the IDE case. Is REPL running with strict or non-strict errors? If the latter, the change would fix also the repl mode.

@JaroslavTulach JaroslavTulach changed the title REPL unnecessarily reports bindings as unused variables and the error contains wrong location Don't unnecessarily report bindings as unused variables (in IDE & REPL) Jul 9, 2024
@hubertp
Copy link
Contributor

hubertp commented Jul 22, 2024

That would fix the IDE case. Is REPL running with strict or non-strict errors? If the latter, the change would fix also the repl mode.

The former it seems. https://github.com/enso-org/enso/blob/develop/engine/runner/src/main/java/org/enso/runner/Main.java#L629

GitHub
Hybrid visual and textual functional programming. Contribute to enso-org/enso development by creating an account on GitHub.

@enso-bot
Copy link

enso-bot bot commented Jul 30, 2024

Hubert Plociniczak reports a new STANDUP for yesterday (2024-07-29):

Progress: PR fixing #9883 is up for review. Working on Tableau integration problems. Turned out to be related to wrong context classloaders when loaded in Enso polyglot. Added sbt logic that deals with Tableau's jar packaging. It should be finished by 2024-07-30.

Next Day: Next day I will be working on the #9883 task. Address review, pick up next item.

@jdunkerley jdunkerley added this to the 2024-08 Release milestone Jul 31, 2024
@mergify mergify bot closed this as completed in #10705 Jul 31, 2024
@mergify mergify bot closed this as completed in d43ad7c Jul 31, 2024
@enso-bot
Copy link

enso-bot bot commented Aug 1, 2024

Hubert Plociniczak reports a new STANDUP for the provided date (2024-07-30):

Progress: Addressed PR comments. Profiling current startup. Noticed a lot of objects being created during IR passes. Experimenting with reducing that to lower memory and GC pressure. It should be finished by 2024-07-30.

Next Day: Next day I will be working on the #10525 task. Finish the experiment. Move into visualization work.

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.

5 participants