-
Notifications
You must be signed in to change notification settings - Fork 452
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
Only use -Werror in CI #428
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
47a707d
Don’t set -Werror for semantic-source in cabal.project.
robrix ead5625
Don’t set -jobs: $ncpus (because that’s the default anyway).
robrix 3ed111f
Don’t set -Werror for the packages in cabal.project.
robrix cd5961f
Add a CI-specific cabal.project file for semantic-source.
robrix 2bc5d31
Build semantic-source using cabal.project.ci in CI.
robrix 0ea9c6f
Add a CI-specific cabal.project file for the local packages.
robrix cba0340
Sort semantic-ast up.
robrix 3808a3f
Add entries for semantic-tsx and semantic-typescript.
robrix 0359f5c
:memo:
robrix bce893d
Move the source-repository-packages up.
robrix 1181a36
:memo:
robrix 951e7b9
Add a notice about keeping the file in sync.
robrix 5cc3fff
Add a notice about keeping the files in sync to the other one.
robrix 64ab932
:memo:
robrix 8f18d5b
Add notices to the semantic-source project files.
robrix 846ca13
More notices.
robrix 4e071f1
Use the CI-specific project files for CI.
robrix 9a745c9
Align the notices a little.
robrix File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
-- ATTENTION: care must be taken to keep this file in sync with cabal.project. If you add a package here, add it there (and add a package stanza with ghc-options to enable errors in CI at the bottom of this file). | ||
|
||
-- Local packages | ||
packages: . | ||
semantic-analysis | ||
semantic-ast | ||
semantic-core | ||
semantic-go | ||
semantic-java | ||
semantic-json | ||
semantic-python | ||
semantic-ruby | ||
semantic-tsx | ||
semantic-typescript | ||
semantic-tags | ||
|
||
-- Packages brought in from other repos instead of hackage | ||
-- ATTENTION: remember to update cabal.project when bumping SHAs here! | ||
source-repository-package | ||
type: git | ||
location: https://github.com/tclem/proto-lens-jsonpb | ||
tag: 5d40444be689bef1e12cbe38da0261283775ec64 | ||
|
||
source-repository-package | ||
type: git | ||
location: https://github.com/antitypical/fused-syntax.git | ||
tag: d11e14581217590a5c67f79cbaeee35ac8acee6a | ||
|
||
source-repository-package | ||
type: git | ||
location: https://github.com/fused-effects/fused-effects-readline.git | ||
tag: 7a96949c77c73c6e5975c8d6171ffb63eb76b467 | ||
|
||
|
||
-- Treat warnings as errors for CI builds | ||
package semantic | ||
ghc-options: -Werror | ||
|
||
package semantic-analysis | ||
ghc-options: -Werror | ||
|
||
package semantic-ast | ||
ghc-options: -Werror | ||
|
||
package semantic-core | ||
ghc-options: -Werror | ||
|
||
package semantic-go | ||
ghc-options: -Werror | ||
|
||
package semantic-java | ||
ghc-options: -Werror | ||
|
||
package semantic-json | ||
ghc-options: -Werror | ||
|
||
package semantic-python | ||
ghc-options: -Werror | ||
|
||
package semantic-ruby | ||
ghc-options: -Werror | ||
|
||
package semantic-tags | ||
ghc-options: -Werror | ||
|
||
package semantic-tsx | ||
ghc-options: -Werror | ||
|
||
package semantic-typescript | ||
ghc-options: -Werror | ||
Comment on lines
+66
to
+70
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We were actually already running into trouble keeping these things synced up correctly, as neither of these packages had |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
packages: . | ||
-- ATTENTION: care must be taken to keep this file in sync with cabal.project.ci. If you add a package here, add it there (and add a package stanza with ghc-options to enable errors in CI at the bottom of that file). | ||
|
||
package semantic-source | ||
ghc-options: -Werror | ||
-- Local packages | ||
packages: . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-- ATTENTION: care must be taken to keep this file in sync with cabal.project. If you add a package here, add it there (and add a package stanza with ghc-options to enable errors in CI at the bottom of this file). | ||
|
||
-- Local packages | ||
packages: . | ||
|
||
|
||
-- Treat warnings as errors for CI builds | ||
package semantic-source | ||
ghc-options: -Werror |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These notices are important, and a rather unfortunate necessity: We can’t just pass
--ghc-option=-Werror
tocabal
in CI, because a long-standing bug incabal
causes it to applyghc-options
specified on the CLI to all packages instead of only the local ones.We could perhaps have added
cabal.project.local
files specifying-Wwarn
for all local packages, but we’d have had to keep those in sync too, and as that file is the target ofcabal configure
, it would potentially introduce a bunch of work to keep spurious changes to those files out of PRs.On the balance, this seemed a better solution, albeit unfortunately duplicative; hopefully the
ATTENTION
notices in these files will remind us to keep things synced up. (And if not, maybe we can add a CI check thatcabal.project
is a prefix ofcabal.project.ci
.)