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
When opening a daml module that uses the CPP pragma, a red underline will appear at the bottom of the file, and the "Problems" tab will show the error "Main.daml: ❌ 22 in hpp-0.6.4:Hpp.CmdLine CPP". The full error is pasted below:
Looking at the source code of hpp (https://github.com/acowley/hpp), one can see that the error on line 105 corresponds to an error call when the argument file does not exist. By overriding the cpp binary used by daml (with --cpp=fake_cpp) with a fake binary that simply logs the given arguments, I found that daml is calling hpp with an argument -iquote/<.../path/to/...>/buggy-cpp/daml/, but looking at the source code of hpp, there's no support for such arguments, so this is interpreted as the target file and thus hpp crashes because clearly there's no such file. Furthermore, using a version of hpp patched to recognize and ignore -iquote arguments, the error message didn't appear (though of course that's not a proper fix). This argument appears to be added by the following line in daml-ghcide,
When opening a daml module that uses the
CPP
pragma, a red underline will appear at the bottom of the file, and the "Problems" tab will show the error "Main.daml: ❌ 22 in hpp-0.6.4:Hpp.CmdLine CPP". The full error is pasted below:Replicate
To replicate, run the commands below, then open
Main.daml
in vscodeFound while working on #17795
The text was updated successfully, but these errors were encountered: