effekt
effekt copied to clipboard
'import' feature of the REPL does not work properly when no module is defined (MS Windows)
Importing a file helloWorld.effekt
def hello() = {
println("Hello World!")
}
to the REPL using
import helloWorld
causes the REPL to load the file, however, as no module name is defined, the generated outputfile will have no name an thus, calling
hello()
in the REPL will fail, as no file helloWorld.js
can be found. The following file, however, works perfectly fine:
module helloWorld
def hello() = {
println("Hello World!")
}
Expected behavior: import
should work the same in Windows and OSX/*nix.
Attached: crash report of the above example.
crashReport.txt
@edding4500 Thanks for reporting! Can you double-check whether my latest commit resolves the issue for you?
The issue resided in the inference for a default file name. I purposefully used a regex to split on both platforms to avoid the dependency on the (JVM) file system. However, my regex was flawed (TM).
Did the build commands in sbt change? I'm not able to build the current master.
Effekt on Windows is broken right now (#401), but this seems to have worked in v0.2.1 on Windows and in WSL. We can revisit this after #401 gets fixed, closing for now, feel free to reopen.