From 2b4302cbf72cc89653d20ee6b8e9ba2e2880c2ff Mon Sep 17 00:00:00 2001 From: kogai Date: Sun, 13 Sep 2026 07:53:01 +0000 Subject: [PATCH 1/3] Un-fold the executable's ghc-options and warn on the test suite too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In package.yaml the executable's flags were written as - -with-rtsopts=-N -Wall -fwarn-incomplete-patterns -fwarn-incomplete-uni-patterns which is one YAML scalar continued over four lines, not four list items. It happens to work — cabal splits the value on whitespace, and the generated onix.cabal shows all four flags — but only by accident, and the next edit to that block can silently drop the warning flags. Write them as separate entries. The test suite had no -Wall at all, so nothing under test/ was checked for incomplete patterns or unused bindings. Add it. This is worth doing alongside the GHC 9.8 move in the base branch: warnings are how a jump of that size tells you what it changed, and the tests were the part not saying anything. Raised in review of #60. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01P8rZakwAiz1jpViUX34x1Z --- onix.cabal | 4 ++-- package.yaml | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/onix.cabal b/onix.cabal index f3c8ce6..0f35932 100644 --- a/onix.cabal +++ b/onix.cabal @@ -4,7 +4,7 @@ cabal-version: 1.12 -- -- see: https://github.com/sol/hpack -- --- hash: 07b4003dd4819b94016dc0a6629b5b634c96677c275eb19e5e97c2a6ac30ffd5 +-- hash: 3926f8a5f904cf97dc479ae5599b082559e417ae2568fb51d2a7fd1931177343 name: onix version: 0.1.0.0 @@ -82,7 +82,7 @@ test-suite onix-test Paths_onix hs-source-dirs: test - ghc-options: -threaded -rtsopts -with-rtsopts=-N + ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall build-depends: HUnit , base >=4.7 && <5 diff --git a/package.yaml b/package.yaml index 070f802..d75abee 100644 --- a/package.yaml +++ b/package.yaml @@ -51,9 +51,9 @@ executables: - -threaded - -rtsopts - -with-rtsopts=-N - -Wall - -fwarn-incomplete-patterns - -fwarn-incomplete-uni-patterns + - -Wall + - -fwarn-incomplete-patterns + - -fwarn-incomplete-uni-patterns dependencies: - onix - optparse-applicative @@ -66,6 +66,7 @@ tests: - -threaded - -rtsopts - -with-rtsopts=-N + - -Wall dependencies: - onix - HUnit From 4fd2d648d85695ec4441078be4263dcd2e4dbf07 Mon Sep 17 00:00:00 2001 From: kogai Date: Mon, 14 Sep 2026 02:24:40 +0000 Subject: [PATCH 2/3] Drop the -fwarn-incomplete-* flags that -Wall already implies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Review checked this against GHC 9.8: -Wincomplete-patterns comes in via -W, and -Wincomplete-uni-patterns moved into -Wall in 9.2, so both spellings were redundant everywhere they appeared. The deprecated -fwarn-* form is still accepted silently — the CI log carries no deprecation output — so this costs nothing per build; it was just six lines implying the project asks for something -Wall does not give. ghc-options now reads as what it is: library -Wall executable -threaded -rtsopts -with-rtsopts=-N -Wall test -threaded -rtsopts -with-rtsopts=-N -Wall Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01P8rZakwAiz1jpViUX34x1Z --- onix.cabal | 6 +++--- package.yaml | 6 +----- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/onix.cabal b/onix.cabal index 0f35932..8952df4 100644 --- a/onix.cabal +++ b/onix.cabal @@ -4,7 +4,7 @@ cabal-version: 1.12 -- -- see: https://github.com/sol/hpack -- --- hash: 3926f8a5f904cf97dc479ae5599b082559e417ae2568fb51d2a7fd1931177343 +-- hash: 266fcbde15564c65aa539a9de93481d85c7dfb8cc735f00132fafc247db05cd9 name: onix version: 0.1.0.0 @@ -39,7 +39,7 @@ library Paths_onix hs-source-dirs: src - ghc-options: -Wall -fwarn-incomplete-patterns -fwarn-incomplete-uni-patterns + ghc-options: -Wall build-depends: base >=4.7 && <5 , bytestring @@ -63,7 +63,7 @@ executable onix-exe Paths_onix hs-source-dirs: app - ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -fwarn-incomplete-patterns -fwarn-incomplete-uni-patterns + ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall build-depends: base >=4.7 && <5 , onix diff --git a/package.yaml b/package.yaml index d75abee..9e0d5d4 100644 --- a/package.yaml +++ b/package.yaml @@ -26,8 +26,6 @@ library: source-dirs: src ghc-options: - -Wall - - -fwarn-incomplete-patterns - - -fwarn-incomplete-uni-patterns dependencies: - mustache - text @@ -52,9 +50,7 @@ executables: - -rtsopts - -with-rtsopts=-N - -Wall - - -fwarn-incomplete-patterns - - -fwarn-incomplete-uni-patterns - dependencies: + dependencies: - onix - optparse-applicative From 903f72f212c3fc1687f9394d3306d38a246ec21e Mon Sep 17 00:00:00 2001 From: kogai Date: Mon, 14 Sep 2026 02:30:57 +0000 Subject: [PATCH 3/3] =?UTF-8?q?Repair=20package.yaml=20=E2=80=94=20the=20l?= =?UTF-8?q?ast=20commit=20corrupted=20it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI caught it immediately: Error: [S-305] Failed to generate a Cabal file using the Hpack library YAML parse exception at line 52, column 20: mapping values are not allowed in this context My own doing. I removed the -fwarn-* lines with a list of replacement strings that had the four-space forms before the six-space ones, and the four-space form is a substring of the six-space form. So on the executable's lines it matched two characters in and deleted from there, leaving a stray " " on each line that then ran into the following `dependencies:` and indented it by eight spaces. Restore the correct indentation. package.yaml now parses, and the four stanzas read as intended: library ['-Wall'] executable ['-threaded','-rtsopts','-with-rtsopts=-N','-Wall'] test ['-threaded','-rtsopts','-with-rtsopts=-N','-Wall'] with both dependency lists intact. Checked with a YAML parser this time, which is what I should have done before pushing the previous commit — onix.cabal was unaffected and its hash is still self-consistent. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01P8rZakwAiz1jpViUX34x1Z --- package.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.yaml b/package.yaml index 9e0d5d4..1a6e1f2 100644 --- a/package.yaml +++ b/package.yaml @@ -50,7 +50,7 @@ executables: - -rtsopts - -with-rtsopts=-N - -Wall - dependencies: + dependencies: - onix - optparse-applicative