Should we ignore `-Werror` in HLS?
Currently -Werror breaks type checking in the presence of warnings. That is, hover and other LSP features stop working or use stale data.
I think simply discarding -Werror is probably the best approach. People use Werror to really say "fail if there are any warnings", and that's something we definitely don't want to do in an IDE, so best ignore it and keep going.
The other option would be to remove it then retroactively upgrade the warnings to errors, which means people see the same thing on the command line as in the IDE. I'd be OK with that too.
I'm still experiencing this issue in the repo https://github.com/input-output-hk/cardano-node, for example when working with the cardano-api package.
NB: In this repo, -Werror is specified in the cabal.project file for cardano-api: https://github.com/input-output-hk/cardano-node/blob/master/cabal.project#L17.
Ok, thanks for noting it, reopening issue
@runeksvendsen i had a report today in discord asking to display warnings as errors in the ide, so it seems it works, have you the chance to try again with a recent hls version?
I just noticed that Werror is currently ignored (I thought it was a bug at first), including only turning specific warnings into errors. Especially in these cases, this is annoying imo.
The other option would be to remove it then retroactively upgrade the warnings to errors, which means people see the same thing on the command line as in the IDE. I'd be OK with that too.
I think this would be the better option, since it reflects what the compiler outputs and actually shows errors as errors.
We are ignoring -WError but it seems is not the ideal behaviour, changing title to relfect it
Is there any update on this? I have -Werror=incomplete-patterns -Werror=incomplete-uni-patterns set in my cabal file and I would want that to be reflected in my IDE. I don't see why we wouldn't pass it to HLS. The IDE should show me when there will be a compilation error.