Whiley / WhileyCompiler

The Whiley Compiler (WyC)
http://whiley.org
Apache License 2.0
217 stars 36 forks source link

Another Flow Typing Bug? #1134

Closed DavePearce closed 2 years ago

DavePearce commented 2 years ago

The following is failing for reasons unknown. It seems eerily similar to #1132 though ...

import Window,Document,Element from w3c::dom

public export method main(Window window):
    Document document = window->document
    Element c = document->getElementById("mycanvas")
DavePearce commented 2 years ago

Ok, so the problem in this case is that we were missing an explicit dependency in the wy.toml file. I guess that meant it couldn't resolve a symbol and this was the root cause. Specifically adding js="0.1.7" to the wy.toml file fixed the problem.

Remembering that, at the moment, we have to provide all dependencies explicitly. However, does suggest that we should know when NameResolution fails.

DavePearce commented 2 years ago

The next part of the problem seems to be that the CompileTask is correctly return false but that this is being ignored.

DavePearce commented 2 years ago

The next problem is that its not reporting any kind of error. Turns out it is generating a failing exit code, but not producing any output. Then the build system is ignore it.

DavePearce commented 2 years ago

UPDATE: so a key difficulty here is that we have a resolution error arising on code being imported from a dependency. That means we nothing in the source file being compiled which we can report an error on.