-
Notifications
You must be signed in to change notification settings - Fork 154
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
Non-sensical error message when failing to parse InlineYaml from precompiled module #2365
Comments
There is another instance of this same sort of behaviour in loadImportAndInterpret, it's like res <- loadModule FromPackageDB ...
case res of
Success _ -> return res
Failed _ -> loadModule FromLocalSourceFile ... Where clash tries to load something from the (global) package database, and if anything goes wrong it assumes that it doesn't exist there, throws away the error message and tries again to load that module from a local source file, possible failing with the confusing error that the module can't be found locally. We should probably fix those two instances in one go. |
Fixes #2365 (cherry picked from commit 2b76b07) Co-authored-by: Martijn Bastiaan <[email protected]>
If your (starter) project contains a primitive such as:
Clash will fail with a very misleading error message:
Ultimately, this is caused by functions in
LoadInterfaceFiles
not propagating up their errors cleanly:clash-compiler/clash-ghc/src-ghc/Clash/GHC/LoadInterfaceFiles.hs
Lines 405 to 461 in a8b213a
The error Clash should have given is:
The text was updated successfully, but these errors were encountered: