-
Notifications
You must be signed in to change notification settings - Fork 696
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
-Werror being used always, not only on validate #9866
Comments
I'd add "-Wwarn=some-error" in the local project to defer dealing with those. |
That doesn't seem reasonable. Erroring on a warning in a development build is an exception, not the norm. Having to manually edit the cabal file to ignore warnings doesn't seem like a good developer experience. |
I don't imagine this is hard to fix. |
Are you talking about warnings you are introducing? |
I'm saying that |
I think, Rodrigo is talking about warning instances introduced by the developer, but not necessarily coming from new warning flags introduced by the developer. |
Sorry I'm going to drop out of this discussion for a bit, on the road in a snow storm! |
Reverts a change that made `-Werror` be applied when building in tree Cabal, even when just developing. Puts `-Werror` back in the `cabal.project.validate` validation project. Fixes haskell#9866
Ignoring warnings is worse, isn't it? It bothered me that I find cabal build output lengthy and its warning easy to miss. I don't mind fixing warnings. |
Perhaps a flag (e.g. |
I think it would be better not to introduce more configuration levers. It sounds like Phil is worried that warnings get ignored. I'm not saying otherwise:
This is solved by the mechanism we have used thus far of having a |
This makes it really annoying to use |
@alt-romes I had a look at #9811. I did the same but with $ git diff
diff --git a/cabal-install/src/Distribution/Client/ProjectConfig/Legacy.hs b/cabal-install/src/Distribution/Client/ProjectConfig/Legacy.hs
index fe2e86d8c..b0d4b87c2 100644
--- a/cabal-install/src/Distribution/Client/ProjectConfig/Legacy.hs
+++ b/cabal-install/src/Distribution/Client/ProjectConfig/Legacy.hs
@@ -32,6 +32,7 @@ module Distribution.Client.ProjectConfig.Legacy
, renderPackageLocationToken
) where
+import Distribution.Compat.Prelude (traceShowId)
import Data.Coerce (coerce)
import Distribution.Client.Compat.Prelude
@@ -268,7 +269,7 @@ parseProjectSkeleton cacheDir httpTransport verbosity projectDir source (Project
let importLocPath = importLoc `consProjectConfigPath` source
-- Once we canonicalize the import path, we can check for cyclical imports
- normLocPath <- canonicalizeConfigPath projectDir importLocPath
+ normLocPath <- canonicalizeConfigPath projectDir $ traceShowId importLocPath
debug verbosity $ "\nimport path, normalized\n=======================\n" ++ render (docProjectConfigPath normLocPath)
|
I understand that you can turn specific errors back into warnings again, but that is beyond my point that The change to use To make |
I agree with Rodrigo that -Werror by default during development is cumbersome to work with. It is common workflow to write code which contains errors to begin with and then clean up all the errors when the patch is ready to submit. Please can we revert this change. |
I think A I think |
Also, the If we want to change this default, there should be an issue where we can discuss the motivation and consequences in more detail. I have merged #9867 for now, as it restores the status-quo and multiple people have been unexpectedly bitten by the changes. Myself included :D |
Reverts a change that made `-Werror` be applied when building in tree Cabal, even when just developing. Puts `-Werror` back in the `cabal.project.validate` validation project. Fixes haskell#9866
In 0876e18 there was a refactor of cabal projects which introduced the following "regression":
Previously, we would only compile with
ghc-options: -Werror
when using thecabal.project.validate{.libonly}
projects.After 0876e18, we always compile with
ghc-options: -Werror
.I don't think in-tree builds should use
-Werror
. It is valuable as a validation tool when the MR has to be finished and be validated by CI, but I don't think that when iterating on a patch one should care about all warnings, and-Werror
makes this unnecessarily painful.cc @philderbeast
The text was updated successfully, but these errors were encountered: