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

Erroring with No_Such_Method.Error without any details #6451

Closed
JaroslavTulach opened this issue Apr 27, 2023 · 3 comments
Closed

Erroring with No_Such_Method.Error without any details #6451

JaroslavTulach opened this issue Apr 27, 2023 · 3 comments

Comments

@JaroslavTulach
Copy link
Member

I have just been investigating #6211 and when I create e.enso with:

$ cat > e.enso 
main =
    a = 5
    if a == 3 then a = 10 else a = 15

and execute it with version 2023.1.1-nightly.2023.4.27 I get useless error:

enso$ ./built-distribution/enso-engine-0.0.0-dev-linux-amd64/enso-0.0.0-dev/bin/enso --run e.enso 
Execution finished with an error: No_Such_Method.Error
        at <enso> e.main<arg-2>(e.enso:3:32-37)
        at <enso> e.main(e.enso:3:5-37)

while displaying No_Such_Method.Error is correct, it is not providing any details. The #6211 bug description claims there used to be time when better message was displayed:

Execution finished with an error: Method `=` of 5 (Integer) could not be found.

Something must have regressed.

PS: We don't need to display the same text as before, but mentioning = and possibly the type of the a variable (e.g. Integer) was very valuable.

@hubertp
Copy link
Collaborator

hubertp commented Apr 27, 2023

This is as expected and consequences of #6275 have been described and discussed there.

@hubertp hubertp added -compiler and removed --regression Important: regression labels Apr 27, 2023
@hubertp
Copy link
Collaborator

hubertp commented Apr 27, 2023

Removed the regression since it is an intentional change.

@JaroslavTulach
Copy link
Member Author

expected ... consequences of #6275 ... discussed there.

It took me a while to realize what you mean!

Take for example No_Such_Method.Error. If we do not import Errors.Common module ... does not have to_display_text in scope

OK, so if I modify the code to

from Standard.Base import all

main =
    a = 5
    if a == 3 then a = 10 else a = 15

then I get the correct error again:

bin/enso --run e.enso
Execution finished with an error: Method `=` of 5 (Integer) could not be found.
        at <enso> e.main<arg-2>(e.enso:5:32-37)
        at <enso> e.main(e.enso:5:5-37)

I think this is OK behavior then. Sorry for causing confusion!

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

No branches or pull requests

3 participants