Open akrmn opened 10 months ago
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