You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This task is automatically imported from the old Task Issue Board and it was originally created by Radosław Waśko.
Original issue is here.
Create a new Enso project consisting of two files F1.enso and Main.enso with the following contents:
F1.enso:
from Standard.Base import all
import Standard.Base.Runtime.Debug
foo =
c = 1
f x y =
if x == 0 then y else
Debug.eval "f (x-1) (x+y+c)"
IO.println (f 10 0)
main =
foo
Main.enso:
from Standard.Base import all
import project.F1
main =
F1.foo
Then run the project in the following ways:
enso run src/F1.enso
enso run src/Main.enso
The first invocation should work and print 65 (along with a warning that c is unused, that is expected).
The second invocation may sometimes work, but often (unfortunately this seems non-deterministic so many tries may be needed, usually should be observable in every 1-3 runs) it will fail with the following error:
In module local.Project_123.F1:
Compiler encountered warnings:
F1.enso[5:5-5:5]: Unused variable c.
Compiler encountered errors:
<interactive_source>[1:1-1:1]: The name `f` could not be found.
<interactive_source>[1:4-1:4]: The name `x` could not be found.
<interactive_source>[1:10-1:10]: The name `x` could not be found.
<interactive_source>[1:12-1:12]: The name `y` could not be found.
<interactive_source>[1:14-1:14]: The name `c` could not be found.
Execution finished with an error: Compilation aborted due to errors.
at <enso> Debug.eval(Internal)
at <enso> f<arg-2>(/home/radeusgd/NBO/repr/Project123/src/F1.enso:8:10-37)
at <enso> Boolean.if_then_else(Internal)
at <enso> f(/home/radeusgd/NBO/repr/Project123/src/F1.enso:7-8)
at <enso> F1.foo<arg-1>(/home/radeusgd/NBO/repr/Project123/src/F1.enso:9:17-22)
at <enso> F1.foo(/home/radeusgd/NBO/repr/Project123/src/F1.enso:9:5-23)
at <enso> Main.main(Main.enso:5:5-10)
I'm using the Enso launcher to run the project, but running directly using the engine runner should probably give the same results.
Comments:
Note: the same applies if we change F1.enso to:
from Standard.Base import all
import Standard.Base.Runtime.Debug
foo =
c = 1
f = x -> y ->
if x == 0 then y else
Debug.eval "f (x-1) (x+y+c)"
IO.println (f 10 0)
main =
foo
The two syntaxes are probably equivalent (as they should be). (Radosław Waśko - Nov 29, 2022)
Not for release - worth investigating at some point. (James Dunkerley - Feb 3, 2023)
The text was updated successfully, but these errors were encountered:
This task is automatically imported from the old Task Issue Board and it was originally created by Radosław Waśko.
Original issue is here.
Create a new Enso project consisting of two files
F1.enso
andMain.enso
with the following contents:F1.enso
:Main.enso
:Then run the project in the following ways:
The first invocation should work and print
65
(along with a warning thatc
is unused, that is expected).The second invocation may sometimes work, but often (unfortunately this seems non-deterministic so many tries may be needed, usually should be observable in every 1-3 runs) it will fail with the following error:
I'm using the Enso launcher to run the project, but running directly using the engine runner should probably give the same results.
Comments:
Note: the same applies if we change
F1.enso
to:The two syntaxes are probably equivalent (as they should be). (Radosław Waśko - Nov 29, 2022)
Not for release - worth investigating at some point. (James Dunkerley - Feb 3, 2023)
The text was updated successfully, but these errors were encountered: