Skip to content
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

Should we ignore -Werror in HLS? #853

Open
pepeiborra opened this issue Aug 21, 2020 · 7 comments · Fixed by haskell/ghcide#738
Open

Should we ignore -Werror in HLS? #853

pepeiborra opened this issue Aug 21, 2020 · 7 comments · Fixed by haskell/ghcide#738
Labels
component: ghcide status: needs info Not actionable, because there's missing information type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@pepeiborra
Copy link
Collaborator

Currently -Werror breaks type checking in the presence of warnings. That is, hover and other LSP features stop working or use stale data.

@ndmitchell
Copy link
Collaborator

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.

pepeiborra referenced this issue in pepeiborra/ghcide Aug 23, 2020
Fixes #735
pepeiborra referenced this issue in pepeiborra/ghcide Aug 23, 2020
Fixes #735
pepeiborra referenced this issue in pepeiborra/ghcide Aug 23, 2020
Fixes #735
pepeiborra referenced this issue in pepeiborra/ghcide Aug 23, 2020
Fixes #735
pepeiborra referenced this issue in haskell/ghcide Sep 2, 2020
* Ignore -Werror

Fixes #735

* Compat with GHC < 8.8
pepeiborra referenced this issue in haskell/ghcide Sep 6, 2020
* Ignore -Werror

Fixes #735

* Compat with GHC < 8.8
pepeiborra referenced this issue in pepeiborra/ide Dec 29, 2020
* Ignore -Werror

Fixes haskell/ghcide#735

* Compat with GHC < 8.8
pepeiborra referenced this issue in pepeiborra/ide Dec 29, 2020
* Ignore -Werror

Fixes haskell/ghcide#735

* Compat with GHC < 8.8
pepeiborra referenced this issue in pepeiborra/ide Dec 29, 2020
* Ignore -Werror

Fixes haskell/ghcide#735

* Compat with GHC < 8.8
@pepeiborra pepeiborra transferred this issue from haskell/ghcide Jan 1, 2021
@runeksvendsen
Copy link
Contributor

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.

@jneira
Copy link
Member

jneira commented Jul 7, 2021

Ok, thanks for noting it, reopening issue

@jneira jneira reopened this Jul 7, 2021
@jneira jneira added component: ghcide status: needs repro type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. labels Jul 7, 2021
@jneira
Copy link
Member

jneira commented Oct 13, 2021

@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?

@konsumlamm
Copy link

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.

@jneira jneira changed the title Ignore/disable -Werror Ignore/disable -Werror keeping explicit warnings as errors Jan 31, 2022
@jneira
Copy link
Member

jneira commented Jan 31, 2022

We are ignoring -WError but it seems is not the ideal behaviour, changing title to relfect it

@hasufell hasufell added status: needs info Not actionable, because there's missing information and removed old_status: needs repro labels Jul 13, 2022
@michaelpj michaelpj changed the title Ignore/disable -Werror keeping explicit warnings as errors Should we ignore -Werror in HLS? May 21, 2023
@mcdearman
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: ghcide status: needs info Not actionable, because there's missing information type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants