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

REPL unnecessarily reports bindings as unused variables and the error contains wrong location #9883

Open
radeusgd opened this issue May 7, 2024 · 1 comment
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 📤 Backlog
Development

No branches or pull requests

3 participants